Joe Peterson <j...@skyrush.com> added the comment:

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]

----------
Added file: http://bugs.python.org/file20613/issue10941.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10941>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to