Mercurial > cpython-lru_cache-weakref
changeset 84336:5bf5c461ec00 3.3
Fix time.strftime("%Y") on AIX: raise a ValueError for year > 9999
time.strtime("%Y") returned "2345" when formatting year 12345.
| author | Victor Stinner <victor.stinner@gmail.com> |
|---|---|
| date | Tue, 25 Jun 2013 02:33:53 +0200 |
| parents | bfede07268a1 |
| children | b78648c6603e d7ae8a84f443 |
| files | Modules/timemodule.c |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Modules/timemodule.c Tue Jun 25 00:42:31 2013 +0200 +++ b/Modules/timemodule.c Tue Jun 25 02:33:53 2013 +0200 @@ -588,7 +588,7 @@ 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]");
