bpo-34672: Don't pass NULL to gmtime_r. (GH-9312)
This commit is contained in:
parent
271818fe27
commit
b93062b7fb
|
@ -1764,7 +1764,8 @@ PyInit_time(void)
|
|||
|
||||
#if defined(__linux__) && !defined(__GLIBC__)
|
||||
struct tm tm;
|
||||
if (gmtime_r(0, &tm) != NULL)
|
||||
const time_t zero = 0;
|
||||
if (gmtime_r(&zero, &tm) != NULL)
|
||||
utc_string = tm.tm_zone;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue