Kaydet (Commit) 06ec45e2 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #10864: limit year to [1; 9999] for strftime() on Solaris

üst f332abbf
......@@ -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]",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment