diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-06-25 00:33:53 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-06-25 00:33:53 (GMT) |
commit | 36b82d85a32e474117297a9c169b67b4408e3096 (patch) | |
tree | 741f82fb8251f594b6edd6b1f912587f423b5316 /Modules/timemodule.c | |
parent | 6efa965a27696ae0acf1c914ca71b545a53be01c (diff) | |
download | cpython-36b82d85a32e474117297a9c169b67b4408e3096.zip cpython-36b82d85a32e474117297a9c169b67b4408e3096.tar.gz cpython-36b82d85a32e474117297a9c169b67b4408e3096.tar.bz2 |
Fix time.strftime("%Y") on AIX: raise a ValueError for year > 9999
time.strtime("%Y") returned "2345" when formatting year 12345.
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 5a0f378..03476d9 100644 --- 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]"); |