Message262450
> 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(). |
|
Date |
User |
Action |
Args |
2016-03-25 18:26:50 | belopolsky | set | recipients:
+ belopolsky, tim.peters, vstinner, berker.peksag, BGuo1 |
2016-03-25 18:26:50 | belopolsky | set | messageid: <1458930410.56.0.294813013962.issue26616@psf.upfronthosting.co.za> |
2016-03-25 18:26:50 | belopolsky | link | issue26616 messages |
2016-03-25 18:26:49 | belopolsky | create | |
|