summaryrefslogtreecommitdiff
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2009-09-22 00:29:48 +0000
committerBrett Cannon <bcannon@gmail.com>2009-09-22 00:29:48 +0000
commit4d94743c28af939864e870f556f8b656fbd3b774 (patch)
tree92d6e417f15caff24e5f2d433fae20701c012068 /Lib/test/test_time.py
parent2a46658beef7de998dfcf85ca5e9ddf97f63a8bf (diff)
downloadcpython-git-4d94743c28af939864e870f556f8b656fbd3b774.tar.gz
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 'Lib/test/test_time.py')
-rw-r--r--Lib/test/test_time.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 965f7e2fef..6683de6ea2 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -87,11 +87,6 @@ class TimeTestCase(unittest.TestCase):
(1900, 1, 1, 0, 0, 0, 0, -1, -1))
self.assertRaises(ValueError, time.strftime, '',
(1900, 1, 1, 0, 0, 0, 0, 367, -1))
- # Check daylight savings flag [-1, 1]
- self.assertRaises(ValueError, time.strftime, '',
- (1900, 1, 1, 0, 0, 0, 0, 1, -2))
- self.assertRaises(ValueError, time.strftime, '',
- (1900, 1, 1, 0, 0, 0, 0, 1, 2))
def test_default_values_for_zero(self):
# Make sure that using all zeros uses the proper default values.