[issue26616] A bug in datetime.astimezone() method
Alexander Belopolsky
report at bugs.python.org
Fri Mar 25 14:26:50 EDT 2016
Alexander Belopolsky added the comment:
> When you made your first astimezone() call, (t = u.astimezone()),
> it was made without a tzinfo parameter, and should result in t's
> timezeone being EST by the documentation.
No, u in my test case was selected to be right before the "fall-back" time. The clocks in New York are moved back at 2am local, or 6am UTC. You can verify that with zdump:
$ zdump -v America/New_York | grep 2015 | grep Nov
America/New_York Sun Nov 1 05:59:59 2015 UTC = Sun Nov 1 01:59:59 2015 EDT isdst=1
America/New_York Sun Nov 1 06:00:00 2015 UTC = Sun Nov 1 01:00:00 2015 EST isdst=0
so 5am UTC is 1 hour before the transition and is correctly translated to EDT by astimezone().
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26616>
_______________________________________
More information about the Python-bugs-list
mailing list