When range checking was added to time.strftime() a check was placed on tm_isdst
commit598b9d4ddf98415e9f97c5b9f45972fa21b499d3
authorbrett.cannon <brett.cannon@6015fed2-1504-0410-9fe1-9d1591cc4771>
Tue, 22 Sep 2009 00:29:48 +0000 (22 00:29 +0000)
committerbrett.cannon <brett.cannon@6015fed2-1504-0410-9fe1-9d1591cc4771>
Tue, 22 Sep 2009 00:29:48 +0000 (22 00:29 +0000)
tree5425f4a002118dd8d756e174d771bac044ac7e52
parent562287a3580821274113f1ab85778d1427cbd700
When range checking was added to time.strftime() a check was placed on tm_isdst
to make sure it fell within [-1, 1] just in case someone implementing
strftime() in libc was stupid enough to assume this. Turns out, though, some
OSs (e.g. zOS) are stupid enough to use values outside of this range for time
structs created by the system itself. So instead of throwing a ValueError,
tm_isdst is now normalized before being passed to strftime().

Fixes issue #6823. Thanks Robert Shapiro for diagnosing the problem and
contributing an initial patch.

git-svn-id: http://svn.python.org/projects/python/trunk@75011 6015fed2-1504-0410-9fe1-9d1591cc4771
Lib/test/test_time.py
Misc/ACKS
Misc/NEWS
Modules/timemodule.c