Patch #1314 by Christian Heimes.

Fix failing unittests for time and strptime on German and probably other
localized Windows installations.
This commit is contained in:
Guido van Rossum 2007-10-23 19:43:28 +00:00
parent e1a0d11c5c
commit b98cda44b7
1 changed files with 2 additions and 3 deletions

View File

@ -528,7 +528,8 @@ time_strftime(PyObject *self, PyObject *args)
e.g. an empty format, or %Z when the timezone e.g. an empty format, or %Z when the timezone
is unknown. */ is unknown. */
PyObject *ret; PyObject *ret;
ret = PyUnicode_FromStringAndSize(outbuf, buflen); ret = PyUnicode_Decode(outbuf, buflen,
TZNAME_ENCODING, NULL);
PyMem_Free(outbuf); PyMem_Free(outbuf);
return ret; return ret;
} }
@ -1035,5 +1036,3 @@ floatsleep(double secs)
return 0; return 0;
} }