You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/08/25 15:22:39 UTC

[GitHub] [arrow] jorisvandenbossche commented on pull request #10998: ARROW-13684: [C++][Compute] Strftime kernel follow-up

jorisvandenbossche commented on pull request #10998:
URL: https://github.com/apache/arrow/pull/10998#issuecomment-905604981


   > Default strftime string is now `%Y-%m-%dT%H:%M:%S`. Perhaps `%Y-%m-%dT%H:%M:%S%z` would be better?
   
   Not fully sure about this one. In https://github.com/apache/arrow/pull/10647#issuecomment-901783928 I mentioned the options of showing no timezone information (what you did now), include a numeric offset (so adding `%z`) or erroring. And for UTC it's also an option to use the literal "Z". 
   
   Including a numeric offset of using literal Z (for UTC) both mean that the default format depends on the type (because for timestamp without timezone we shouldn't add an offset).
   
   > Timestamps without timezone are now strftime-ed as if they were in `UTC`. Not sure this is the way to go. What if the local time is really invalid but we can't tell?
   
   Timestamps without timezone should be formatted as is, showing the wall clock time they represent. So I think formatting as if they are in UTC but without any timezone indication is correct. Although we should not allow adding timezone information with `%Z` or `%z` in those cases. 
   I don't think we need to care about invalid local times when printing, that's a user responsibility (and anyway, you only know if a time is invalid once you assume a certain timezone, which we don't do in strftime). 
   
   > Document %S behavior. What would be a good location to do that?
   
   You could start with the compute.rst table notes, but personally I would also include it in the docstring.
   
   
   
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org