Commit 7a3960d6 authored by Steve Dower's avatar Steve Dower

Issue #25092: Fix datetime.strftime() failure when errno was already set to EINVAL.

parent b58d064c
...@@ -18,6 +18,9 @@ Core and Builtins ...@@ -18,6 +18,9 @@ Core and Builtins
Library Library
------- -------
- Issue #25092: Fix datetime.strftime() failure when errno was already set to
EINVAL.
- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods - Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties of datetime.datetime: microseconds are now rounded to nearest with ties
going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding
......
...@@ -653,6 +653,9 @@ time_strftime(PyObject *self, PyObject *args) ...@@ -653,6 +653,9 @@ time_strftime(PyObject *self, PyObject *args)
PyErr_NoMemory(); PyErr_NoMemory();
break; break;
} }
#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
errno = 0;
#endif
_Py_BEGIN_SUPPRESS_IPH _Py_BEGIN_SUPPRESS_IPH
buflen = format_time(outbuf, i, fmt, &buf); buflen = format_time(outbuf, i, fmt, &buf);
_Py_END_SUPPRESS_IPH _Py_END_SUPPRESS_IPH
......
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