The README added to the tzdata package is wrong. The right db is UTC, and the posix db is POSIX. TAI is not represented by the tzdata at all. A TAI zone db would be 10 seconds ahead of POSIX. Ie, 14:15:42 POSIX time is 14:15:52 TAI (and is currently 14:15:19 in right) on any given day in any given zone. (POSIX' epoch may be specified in UTC, but since they pretend that leap seconds do not exist they consequently define their own time.) posix is the default not because that is what anyone uses in real life, but because too much code incorrectly assumes that hours start at int(t/3600) and POSIX chickened out from Doing The Right Thing Anyway. Including a README about it is a Good Thing, but the initial one is misleading.
Look again at the README.Debian file. It doesn't pretend that the "right db" should return the TAI time. It is the db to use if your hardware clock is set to TAI, so that the returned time is correct. The TAI time is currently 33 second ahead of UTC (10 seconds, plus the 23 leap seconds that have been added since 1972). That's why using the "right" db, currently returns a time 33 seconds before the "posix" db.
Aurelien> Look again at the README.Debian file. It doesn't pretend that Aurelien> the "right db" should return the TAI time. Aurelien> It is the db to use if your hardware clock is set to TAI, so Aurelien> that the returned time is correct. The hardware clock is not relevant once the system is up, and ntp deals with (fractions of) seconds since its epoch, which is defined relative to UTC. right converts from seconds since 1970/January/01T00:00:00 UTC (the time_t epoch) to UTC-based time; posix converts to POSIX-based time. The README should say something to the effect that if you care about real wall-clock time use right and if you want to pretend that every day has exactly 60*60*24 seconds choose posix.
Hi, (14 years later...) I'm also trying to setup a system with TAI as CLOCK_REALTIME. UTC - TAI offset is now 37s. But the offset between the "posix" and "right" zoneinfo is only 27s : $ TZDIR=/usr/share/zoneinfo/right TZ=Europe/Paris date; \ TZDIR=/usr/share/zoneinfo/posix TZ=Europe/Paris date Mon Jan 16 11:17:00 CET 2023 Mon Jan 16 11:17:27 CET 2023 Readme.debian says: *hardware clock set to TAI*. (emphasis is mine) Which means that with CLOCK_REALTIME setup as TAI and TZDIR=.../right, the displayed time is wrong by 10s. I've check the content of right/UTC and it contains a leapsecond offset of 27s since 01-01-2017. I guess it miss the original UTC-TAI offset of 10s (before the first leapsecond in June 1972) Either something is wrong in the "right" zoneinfo or the doc (or I'm mistaken). As a workaround, I've setup CLOCK_REALTIME as TAI+10s and using the "right" zoneinfo, the displayed time is correct. Regards,