diff options
author | Steve Dower <steve.dower@microsoft.com> | 2016-12-14 19:22:05 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2016-12-14 19:22:05 (GMT) |
commit | c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079 (patch) | |
tree | c94cb8b848d3f31dc5b7b03e39c6510b73ae8e1b /Modules/timemodule.c | |
parent | 386072ebe02b54eb9fb303031c769bef094967f5 (diff) | |
download | cpython-c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079.zip cpython-c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079.tar.gz cpython-c3c6f71662cdfcc4ab27c9d8df1dbbe96a3bf079.tar.bz2 |
Fixes maximum usable length of buffer for formatting time zone in localtime().
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index db0ab58..ebd44ad 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -398,7 +398,7 @@ time_localtime(PyObject *self, PyObject *args) struct tm local = buf; char zone[100]; int gmtoff; - strftime(zone, sizeof(buf), "%Z", &buf); + strftime(zone, sizeof(zone), "%Z", &buf); gmtoff = timegm(&buf) - when; return tmtotuple(&local, zone, gmtoff); } |