summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-09-22 00:29:48 (GMT)
committerBrett Cannon <bcannon@gmail.com>2009-09-22 00:29:48 (GMT)
commit4d94743c28af939864e870f556f8b656fbd3b774 (patch)
tree92d6e417f15caff24e5f2d433fae20701c012068 /Misc
parent2a46658beef7de998dfcf85ca5e9ddf97f63a8bf (diff)
downloadcpython-4d94743c28af939864e870f556f8b656fbd3b774.zip
cpython-4d94743c28af939864e870f556f8b656fbd3b774.tar.gz
cpython-4d94743c28af939864e870f556f8b656fbd3b774.tar.bz2
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS4
2 files changed, 5 insertions, 0 deletions
diff --git a/Misc/ACKS b/Misc/ACKS
index e0bd435..4889be8 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -669,6 +669,7 @@ Jerry Seutter
Denis Severson
Ian Seyer
Ha Shao
+Richard Shapiro
Bruce Sherwood
Pete Shinners
Michael Shiplett
diff --git a/Misc/NEWS b/Misc/NEWS
index 89cbf3c..15db199 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1340,6 +1340,10 @@ C-API
Extension Modules
-----------------
+- Issue #6823: Allow time.strftime() to accept a tuple with a isdst field
+ outside of the range of [-1, 1] by normalizing the value to within that
+ range.
+
- Issue #6877: Make it possible to link the readline extension to libedit
on OSX.