From b98cda44b714d41e466326f95adcbc649dde1c21 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 23 Oct 2007 19:43:28 +0000 Subject: Patch #1314 by Christian Heimes. Fix failing unittests for time and strptime on German and probably other localized Windows installations. --- Modules/timemodule.c | 5 ++--- 1 file 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; } - - -- cgit v0.12