diff options
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; } - - |