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 <rep...@bugs.python.org>
<http://bugs.python.org/issue26616>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to