novemberkilo commented on a change in pull request #849:
URL: https://github.com/apache/arrow-rs/pull/849#discussion_r735105590
##########
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:
Thanks @alamb
I agree that at a minimum we should validate that Timezone is None before
defaulting it to UTC (and thus adding a Z). I wanted to please clarify the
behaviour for when the Timezone is not None. My suggestion is that in this case
we write out an ISO8601 complaint representation. For example, if The Timezone
is "Australia/Sydney" then the string includes "+11:00" (well, when DST is in
effect anyway).
If I understand correctly, the CSV that is written out cannot continue to
refer to the schema that it was generated against. Thus, timestamps that are
written out should represent the timezone present in the scheme (or default to
UTC if None is present).
--
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]