mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
Fixes maximum usable length of buffer for formatting time zone in localtime().
This commit is contained in:
parent
386072ebe0
commit
c3c6f71662
1 changed files with 1 additions and 1 deletions
|
|
@ -398,7 +398,7 @@ time_localtime(PyObject *self, PyObject *args)
|
||||||
struct tm local = buf;
|
struct tm local = buf;
|
||||||
char zone[100];
|
char zone[100];
|
||||||
int gmtoff;
|
int gmtoff;
|
||||||
strftime(zone, sizeof(buf), "%Z", &buf);
|
strftime(zone, sizeof(zone), "%Z", &buf);
|
||||||
gmtoff = timegm(&buf) - when;
|
gmtoff = timegm(&buf) - when;
|
||||||
return tmtotuple(&local, zone, gmtoff);
|
return tmtotuple(&local, zone, gmtoff);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue