On 2025-12-28 19:12, Paul Eggert via tz wrote:
On 2025-12-28 10:59, Paul Gilmartin via tz wrote:
ISTR on Linux long ago, a subdirectory, /usr/share/zoneinfo/right, which used arguments not POSIX time but TAI. Was that a local hack, or was it removed, possibly because of uncertainty of future leap seconds?
It's still there, as a rarely-used option. By default current TZDB installs two files for Los Angeles:
/usr/share/zoneinfo/America/Los_Angeles /usr/share/zoneinfo-leaps/America/Los_Angeles
and the latter file uses TAI. You can change the installation default by using 'make REDO=posix_only', 'make REDO=right_only', or 'make REDO=right_posix'; see the Makefile.
Many platforms, like Debian, use an older directory organization, which puts the two Los Angeles files here instead:
/usr/share/zoneinfo/America/Los_Angeles /usr/share/zoneinfo/right/America/Los_Angeles /usr/share/zoneinfo/posix/America/Los_Angeles
where the first two names resolve to the same file (or to files with identical contents).
An advantage of the older approach is that one can use 'TZ="right/America/ Los_Angeles" to get TAI. A disadvantage is that functions like gmtime no longer work the way people expect; for example, TZ='right/America/Los_Angeles' gets you localtime with leap seconds, but gmtime without leap seconds, which leads to nonsense like this with GNU date:
$ export TZ=right/America/Los_Angeles $ format='%Y-%m-%d %H:%M:%S %::z (%Z)' $ date "+$format"; date -u "+$format" 2025-12-28 18:04:48 -08:00:00 (PST) 2025-12-29 02:05:15 +00:00:00 (UTC)
so the timestamps make it look like Los Angeles is 8 hours and 27 seconds behind UTC, even though the difference is correctly reported to be 8 hours exactly. This confusion breaks some applications.
This is why TZDB 1998e changed to something more like the current approach; see commit 77e3dfe1a7b7e14e9f252fc628a5d405c35b6444 dated 1998-05-25 13:04:43 -0400 in the development repository. Effectively this means the TAI TZif files are inaccessible unless you use full pathnames in TZ, which I hope means you know the trouble you're getting into.
Perhaps it is time to change the default REDO value in the Makefile to REDO='posix_only', as REDO='posix_right' isn't being used much and when it is used is probably being used incorrectly. Such a change to the default wouldn't affect platforms like Debian that continue to use the pre-1998 approach.
Fedora, OpenSuSE and related distros release tzdata{,-posix,-right} under zoneinfo/{,posix,right}: https://src.fedoraproject.org/rpms/tzdata/blob/f43/f/tzdata.spec Debian and related release TAI including Etc/GMT[-+][0-9]+ in tzdata-legacy under zoneinfo/right. -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut -- Antoine de Saint-Exupéry