[tz] What's "right"?

Guy Harris gharris at sonic.net
Thu Nov 12 18:11:26 UTC 2020

On Nov 12, 2020, at 10:02 AM, Paul Gilmartin via tz <tz at iana.org> wrote:

> In: ftp://ftp.iana.org/tz/tz-link.html
> I read:
>    The tz code and data support leap seconds via an optional
>    "right" configuration, ...
> Empirically, this seems to assume time_t of TAI-10.  This isn't
> GPS, which I understand to be TAI-19:
>    http://www.bipm.org/utils/en/pdf/time_ann_rep/Time_annual_report_2015/25_utcgpsglo_TAR15.pdf
> TAI-10 is (accidentally?) the epoch of the IBM z/OS TOD clock.
> I find a couple references to "zoneinfo/right" in Makefile and NEWS.
> Is there more complete documentation of "right" and its rationale
> elsewhere?

I don't know whether it's documented anywhere, but:

"right" is intended to support converting times that are represented as seconds that have elapsed since January 1, 1970, 00:00:00 UTC - as opposed to be represented as "seconds since the Epoch", which means "seconds *except for leap seconds* that have elapsed since January 1, 1970, 00:00:00 UTC" - to year/month/day/hour/minute/second.

I.e., that's a counter that started as 0 on January 1, 1970, 00:00:00 UTC, and that increments by 1 every second, rather than getting adjusted to conform to POSIX.

gmtime() would convert such a time to UTC, with "second" possibly being > 59.

More information about the tz mailing list