diff options
author | Guido van Rossum <guido@python.org> | 2007-10-23 19:43:28 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-10-23 19:43:28 (GMT) |
commit | b98cda44b714d41e466326f95adcbc649dde1c21 (patch) | |
tree | e8ea8a1fbdfef844869f9130555fa6ed4a232fdc /Modules | |
parent | e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f (diff) | |
download | cpython-b98cda44b714d41e466326f95adcbc649dde1c21.zip cpython-b98cda44b714d41e466326f95adcbc649dde1c21.tar.gz cpython-b98cda44b714d41e466326f95adcbc649dde1c21.tar.bz2 |
Patch #1314 by Christian Heimes.
Fix failing unittests for time and strptime on German and probably other
localized Windows installations.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/timemodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index cd50594..d7e5cfd 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -528,7 +528,8 @@ time_strftime(PyObject *self, PyObject *args) e.g. an empty format, or %Z when the timezone is unknown. */ PyObject *ret; - ret = PyUnicode_FromStringAndSize(outbuf, buflen); + ret = PyUnicode_Decode(outbuf, buflen, + TZNAME_ENCODING, NULL); PyMem_Free(outbuf); return ret; } @@ -1035,5 +1036,3 @@ floatsleep(double secs) return 0; } - - |