Commit b93062b7 authored by Benjamin Peterson's avatar Benjamin Peterson Committed by GitHub

bpo-34672: Don't pass NULL to gmtime_r. (GH-9312)

parent 271818fe
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment