[RFC] Reduce /etc/localtime stat calls when TZ is unset
Paul Eggert
eggert@cs.ucla.edu
Sat Nov 7 18:14:30 GMT 2026
On 2026-11-07 08:45, Yair Lenga wrote:
> I propose a change to the localtime function - instead of checking the
> timestamp on every call, it will use a cheap clock check to reduce excess
> probing - e.g., like every 60 seconds.
TZDB[1] localtime.c does this if TZ_CHANGE_INTERVAL is defined. We got the idea from FreeBSD, which uses a 61-second gap. It would be helpful to merge this (and other ideas) from TZDB into glibc.
[1]: https://www.iana.org/time-zones/repository/tzdb-latest.tar.lz
More information about the Libc-alpha
mailing list