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

This commit is contained in:
Steve Dower 2015-09-22 14:51:42 -07:00
parent 3a0f471e5f
commit 57ab1cdb15
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,9 @@ Core and Builtins
Library
-------
- Issue #25092: Fix datetime.strftime() failure when errno was already set to
EINVAL.
- Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties
going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding

View File

@ -653,6 +653,9 @@ time_strftime(PyObject *self, PyObject *args)
PyErr_NoMemory();
break;
}
#if defined _MSC_VER && _MSC_VER >= 1400 && defined(__STDC_SECURE_LIB__)
errno = 0;
#endif
_Py_BEGIN_SUPPRESS_IPH
buflen = format_time(outbuf, i, fmt, &buf);
_Py_END_SUPPRESS_IPH