alamb commented on a change in pull request #849:
URL: https://github.com/apache/arrow-rs/pull/849#discussion_r735099819
##########
File path: arrow/src/csv/writer.rs
##########
@@ -241,7 +241,7 @@ impl<W: Write> Writer<W> {
.value_as_datetime(row_index)
.unwrap(),
};
- format!("{}", datetime.format(&self.timestamp_format))
+ format!("{}Z", datetime.format(&self.timestamp_format))
Review comment:
Hi @novemberkilo --
The interpretation of the Timezone string in the `DataType` is governed by
the spec:
https://github.com/apache/arrow/blob/8e43f23dcc6a9e630516228f110c48b64d13cec6/format/Schema.fbs#L223-L247
Note that the Rust Arrow implementation doesn't really have full support for
timezones (most of the code assumes it is `None` and then treats that as "UTC"
which is not correct per the spec).
On the other hand, your PR seems to be just following this same pattern
(treat timestamps as UTC) -- what if we explicitly validated that the
`Timezone` as `None` before printing out the Z?
@bjchambers do you have any thoughts?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]