summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strftime.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-03-02 04:38:10 (GMT)
committerBrett Cannon <bcannon@gmail.com>2004-03-02 04:38:10 (GMT)
commitd1080a3418b2a162b44d0d5738a6da2276133eb7 (patch)
tree73902ccab6d9c184e726722e1e999fc460b5a90b /Lib/test/test_strftime.py
parent0a4977c2f3b8b3cd80f326f44e87076b2578b1b6 (diff)
downloadcpython-d1080a3418b2a162b44d0d5738a6da2276133eb7.zip
cpython-d1080a3418b2a162b44d0d5738a6da2276133eb7.tar.gz
cpython-d1080a3418b2a162b44d0d5738a6da2276133eb7.tar.bz2
Have strftime() check its time tuple argument to make sure the tuple's values
are within proper boundaries as specified in the docs. This can break possible code (datetime module needed changing, for instance) that uses 0 for values that need to be greater 1 or greater (month, day, and day of year). Fixes bug #897625.
Diffstat (limited to 'Lib/test/test_strftime.py')
-rwxr-xr-xLib/test/test_strftime.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py
index 9bd045d..44e2ae2 100755
--- a/Lib/test/test_strftime.py
+++ b/Lib/test/test_strftime.py
@@ -38,7 +38,7 @@ def strftest(now):
if now[3] < 12: ampm='(AM|am)'
else: ampm='(PM|pm)'
- jan1 = time.localtime(time.mktime((now[0], 1, 1) + (0,)*6))
+ jan1 = time.localtime(time.mktime((now[0], 1, 1, 0, 0, 0, 0, 1, 0)))
try:
if now[8]: tz = time.tzname[1]