[tz] zoneinfo vs zoneinfo-leaps

Brian Inglis Brian.Inglis at systematicsw.ab.ca
Tue Nov 17 07:11:25 UTC 2015


On 2015-11-16 13:48, Ken Murchison wrote:
> Maybe this is a FAQ but I haven't found the answer.
>
> Having studied up the tzfile(5) format and written some code to produce these files,
>I'm wondering why the files in zoneinfo-leaps include the leap records AND adjust
>the transition times by the appropriate number of leap seconds.
>This seems redundant to me.
>If the file includes the leap second records, why not let the consumer adjust the transitions?

If you zdump say 1970-1980 posix/Universal vs right/Universal or
posix/Europe/London vs right/Europe/London and look at the output,
you will see that the latter shows additional transitions for UT
with non-zero seconds, zone transition times with :59:60 labels,
and the following :00:00 time labels every time there is a leap second.
So the UT time scale here appears to be TAI - 10 seconds from 1 Jan 1972
(as TAI was defined to be 10 seconds ahead of UTC then).

See http://www.madore.org/~david/computers/unix-leap-seconds.html#tai-minus-10

zdump extract:
right/Universal  Sat Jul  1 00:00:00 1972 UT = Fri Jun 30 23:59:60 1972 UTC isdst=0 gmtoff=0
right/Universal  Sat Jul  1 00:00:01 1972 UT = Sat Jul  1 00:00:00 1972 UTC isdst=0 gmtoff=0
right/Universal  Mon Jan  1 00:00:01 1973 UT = Sun Dec 31 23:59:60 1972 UTC isdst=0 gmtoff=0
right/Universal  Mon Jan  1 00:00:02 1973 UT = Mon Jan  1 00:00:00 1973 UTC isdst=0 gmtoff=0
right/Universal  Tue Jan  1 00:00:02 1974 UT = Mon Dec 31 23:59:60 1973 UTC isdst=0 gmtoff=0
right/Universal  Tue Jan  1 00:00:03 1974 UT = Tue Jan  1 00:00:00 1974 UTC isdst=0 gmtoff=0
right/Universal  Wed Jan  1 00:00:03 1975 UT = Tue Dec 31 23:59:60 1974 UTC isdst=0 gmtoff=0
right/Universal  Wed Jan  1 00:00:04 1975 UT = Wed Jan  1 00:00:00 1975 UTC isdst=0 gmtoff=0
right/Universal  Thu Jan  1 00:00:04 1976 UT = Wed Dec 31 23:59:60 1975 UTC isdst=0 gmtoff=0
right/Universal  Thu Jan  1 00:00:05 1976 UT = Thu Jan  1 00:00:00 1976 UTC isdst=0 gmtoff=0
right/Universal  Sat Jan  1 00:00:05 1977 UT = Fri Dec 31 23:59:60 1976 UTC isdst=0 gmtoff=0
right/Universal  Sat Jan  1 00:00:06 1977 UT = Sat Jan  1 00:00:00 1977 UTC isdst=0 gmtoff=0
right/Universal  Sun Jan  1 00:00:06 1978 UT = Sat Dec 31 23:59:60 1977 UTC isdst=0 gmtoff=0
right/Universal  Sun Jan  1 00:00:07 1978 UT = Sun Jan  1 00:00:00 1978 UTC isdst=0 gmtoff=0
right/Universal  Mon Jan  1 00:00:07 1979 UT = Sun Dec 31 23:59:60 1978 UTC isdst=0 gmtoff=0
right/Universal  Mon Jan  1 00:00:08 1979 UT = Mon Jan  1 00:00:00 1979 UTC isdst=0 gmtoff=0

Subtract another 9 seconds from that UT time scale from 1980 onwards
to get the GPS time scale (TAI - 19) which started from 6 Jan 1980.

Prior to 1972, UTC leap (milli-)second adjustments were:
1961-Jan-01 +1.42282s
1961-Aug-01 -0.05s
1962-Jan-01 +0.47304s
1963-Nov-01 +0.1s
1964-Jan-01 +1.29427s
1964-Apr-01 +0.1s
1964-Sep-01 +0.1s
1965-Jan-01 +0.1s
1965-Mar-01 +0.1s
1965-Jul-01 +0.1s
1965-Sep-01 +0.1s
1966-Jan-01 +0.47304s
1968-Feb-01 -0.1s
1972-Jan-01 +5.78683s

So handling time could be worse than our current leap second discontinuity every couple of years.
Time is understood by lawyers and politicians to be mean solar time plus or minus legal adjustments, like DST and leap seconds.
If the ITU-R disconnects their time from earth rotation, we just might have to get more familiar with astronomical time calculations, or maybe we can forget about all this and just use LMT everywhere,
keeping tz data around for purely historical dates and times when zones were standard!

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada


More information about the tz mailing list