mirror of
https://github.com/python/cpython.git
synced 2025-01-16 21:44:54 +08:00
Fixes maximum usable length of buffer for formatting time zone in localtime().
This commit is contained in:
commit
0885519914
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user