projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6efa965
)
Fix time.strftime("%Y") on AIX: raise a ValueError for year > 9999
author
Victor Stinner
<victor.stinner@gmail.com>
Tue, 25 Jun 2013 00:33:53 +0000
(
02:33
+0200)
committer
Victor Stinner
<victor.stinner@gmail.com>
Tue, 25 Jun 2013 00:33:53 +0000
(
02:33
+0200)
time.strtime("%Y") returned "2345" when formatting year 12345.
Modules/timemodule.c
patch
|
blob
|
history
diff --git
a/Modules/timemodule.c
b/Modules/timemodule.c
index 5a0f378aed9c74a52c86b711ee162fe93efa8cba..03476d97dcead1439fbb956a3a518bf0437b5b4d 100644
(file)
--- a/
Modules/timemodule.c
+++ b/
Modules/timemodule.c
@@
-588,7
+588,7
@@
time_strftime(PyObject *self, PyObject *args)
else if (!gettmarg(tup, &buf) || !checktm(&buf))
return NULL;
-#if defined(_MSC_VER) || defined(sun)
+#if defined(_MSC_VER) || defined(sun)
|| defined(_AIX)
if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) {
PyErr_SetString(PyExc_ValueError,
"strftime() requires year in [1; 9999]");