mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #10864: limit year to [1; 9999] for strftime() on Solaris
This commit is contained in:
parent
f332abbf15
commit
06ec45e2f8
1 changed files with 1 additions and 1 deletions
|
@ -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]",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue