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 2020/07/02 20:58:53 UTC

[GitHub] [arrow] jorisvandenbossche commented on pull request #7604: ARROW-9223: [Python] Propagate timezone information in pandas conversion

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


   Moving the discussion at https://github.com/apache/arrow/pull/7604#discussion_r449130523 outside the inline thread here (which makes it easier to find).
   
   It's still not really clear to me what the actual issue is at hand that we are discussing. What was the problem that started the discussion?
   
   >>>  timezone naive datetimes reflect system timezone
   >>
   >> Who does this? 
   >
   > Python's datetime.astimezone assumes this as of 3.6. Since datetime essentially becomes the "display" I would think most people would assume system timezone values.
   
   But that is only for the `astimezone` method, which we don't use? (in this PR you now only use it once in the tests). And the display of `datetime.datetime` is not influenced by system timezone, AFAIK?
   
   In this PR (and also already on master), we are using `fromutc`, which seems correct to me, since internally in arrow tz-aware timestamps are stored as UTC. 
   And for tz-naive we don't need to handle any timezone issue, and can just convert it do a datetime.datetime object, which by default is also tz-naive and can thus be used as is.
   
   
   
   
   


----------------------------------------------------------------
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.

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