diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-08 03:35:36 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-01-08 03:35:36 (GMT) |
commit | 06ec45e2f8108d6bfc1fa8abe80de94bc4eeb8a3 (patch) | |
tree | 9d52c5bceb3cf7cb3d3cac8b9a68abd682bf8fa4 /Modules | |
parent | f332abbf1549b2db55960caf951f124475c93ed8 (diff) | |
download | cpython-06ec45e2f8108d6bfc1fa8abe80de94bc4eeb8a3.zip cpython-06ec45e2f8108d6bfc1fa8abe80de94bc4eeb8a3.tar.gz cpython-06ec45e2f8108d6bfc1fa8abe80de94bc4eeb8a3.tar.bz2 |
Issue #10864: limit year to [1; 9999] for strftime() on Solaris
Diffstat (limited to 'Modules')
-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 314d8c3..2286006 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -474,7 +474,7 @@ time_strftime(PyObject *self, PyObject *args) else if (!gettmarg(tup, &buf) || !checktm(&buf)) return NULL; -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(sun) if (buf.tm_year + 1900 < 1 || 9999 < buf.tm_year + 1900) { PyErr_Format(PyExc_ValueError, "strftime() requires year in [1; 9999]", |