* lib/timegm.c (__timegm64): Omit now-unnecessary initialization
of tm_isdst. Anyway, the initialization was always wrong, since
timegm should not modify *TMP when it fails.
2024-10-04 Paul Eggert <eggert@cs.ucla.edu>
+ mktime: fix timegm bug that set tmp->tm_isdst
+ * lib/timegm.c (__timegm64): Omit now-unnecessary initialization
+ of tm_isdst. Anyway, the initialization was always wrong, since
+ timegm should not modify *TMP when it fails.
+
mktime: refactor to get closer to glibc
* lib/mktime.c (convert_time): Reorder args.
(__tz_convert): New macro. All convert_time callers changed to use it.
__timegm64 (struct tm *tmp)
{
static mktime_offset_t gmtime_offset;
- tmp->tm_isdst = 0;
return __mktime_internal (tmp, false, &gmtime_offset);
}