[LEAPSECS] 'right' zone in tzdata on Linux

Warner Losh imp at bsdimp.com
Mon Jun 22 17:14:03 EDT 2015

> On Jun 22, 2015, at 3:03 PM, Henry Hallam <henry at pericynthion.org> wrote:
> Dear leapers,
> I'm trying to write a shell script, to be run on an ordinary Debian
> Jessie system, which needs to know the current TAI time.  +/- 1 second
> is fine.
> I was under the impression that
>  TZ='right/UTC' date
> would return the TAI.  However, it appears to be out by one minute:
>  $ TZ='right/UTC' date; date -u
>  Mon Jun 22 21:00:29 UTC 2015
>  Mon Jun 22 21:00:54 UTC 2015
> I would expect the first line to instead be
>  Mon Jun 22 21:01:29 UTC 2015
> Am I using the 'right' timezone incorrectly, missing something else,
> or is there an error in the TZ database?

That looks almost right to me. The first line should be lagging by TAI-UTC difference.
That’s currently 35, not 25, but 10s is the delta at the dawn of the leap-second era.
On a ‘right’ system the system time is set to TAI, and date -u gives back the system
time without any timezone adjustment, no?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://pairlist6.pair.net/pipermail/leapsecs/attachments/20150622/7fcb85bf/attachment.pgp>

More information about the LEAPSECS mailing list