This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lavajoe
Recipients belopolsky, georg.brandl, lavajoe
Date 2011-01-29.21:45:14
SpamBayes Score 2.220446e-16
Marked as misclassified No
Message-id <1296337515.04.0.573251204161.issue10941@psf.upfronthosting.co.za>
In-reply-to
Content
Here is a new patch that adds a test to the tests committed for issue 10939.

This new test case is needed to trigger the DST issue.  This test is not timezone-dependent (in the sense that one does not have to have a specific timezone set for it to work), but it does depend on the DST change happening at 02:00 on the first Sunday in April, 2000.  This is the case for most of the United States, but to make it work everywhere, I have added code that sets the TZ to one that works, and then reverts the temporary TZ change after the test.

The bug is triggered when the time described in the internal date string, ignoring the time offset, is between 02:00 and 03:00.  This is because the raw time in the string is interpreted as local time, and local times in this range are basically invalid, since time advances to 03:00 when 02:00 is reached because of the DST change.  This causes the final result to be off by one hour.

[This patch is only for Python 3]
History
Date User Action Args
2011-01-29 21:45:15lavajoesetrecipients: + lavajoe, georg.brandl, belopolsky
2011-01-29 21:45:15lavajoesetmessageid: <1296337515.04.0.573251204161.issue10941@psf.upfronthosting.co.za>
2011-01-29 21:45:14lavajoelinkissue10941 messages
2011-01-29 21:45:14lavajoecreate