]> Savannah Git Hosting - gnulib.git/commit
mktime: improve tm_isdst heuristic
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Jan 2025 20:40:11 +0000 (12:40 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 5 Jan 2025 02:34:54 +0000 (18:34 -0800)
commit1858d1e3e389958b978908ffbaef76c9846bb462
tree765a66b250a88bff380b6d701a8812b90ffa7ae9
parent8311fd7f7462ee2b7af0b1f5116b9e85884fe750
mktime: improve tm_isdst heuristic

* lib/mktime.c (__mktime_internal): When tm_isdst disagrees with
what was requested, search at most a year (+ stride) from the
requested time for a matching tm_isdst, and ignore the request if
the search fails.  This is more likely to match user expectations
in timezones like Asia/Kolkata.
Problem reported by Florian Weimer in:
https://sourceware.org/pipermail/libc-alpha/2025-January/163342.html
ChangeLog
lib/mktime.c