Re: [LEAPSECS] Stupid question from programmer: Why not just eliminate ALL UTC corrections ?

From: Scott Moore <>
Date: Wed, 03 Aug 2005 22:48:35 -0700

Mark Calabretta wrote:

>On Wed 2005/08/03 19:33:54 MST, Scott Moore wrote
>in a message to: LEAPSECS_at_ROM.USNO.NAVY.MIL
>>I'm saying that reference time and solar time go their own
>>separate ways, once and for all.
>I believe it has already been suggested many times that applications
>that need uniform time should use TAI, in effect putting computers and
>such devices in a putative "atomic time zone". (If mapped to the
>surface of the Earth this time zone would correspond to a terrestrial
>longitude that moved slowly across the surface in an unpredictable way
>though located to within 400m by the count of leap seconds.)
>Dropping leap seconds from UTC is effectively a back-door way of doing
>this, which is why the computer scientists like it, but it also forces
>civil time users to do the same, slowly forcing civil time to deviate
>from solar time. The effect of this would become apparent surprisingly
>quickly, in just a few centuries, and this is what makes the
>astronomers, and probably many unsuspecting non-astronomers, unhappy.
>Suppose that computers etc. were to maintain TAI, and civil time
>continued to use UTC with leap seconds (at least until leap seconds
>become too frequent - but that won't happen before humans become
>extinct). Then in order for computers to accept or report a user-
>friendly (civil!) time, the conversion between their atomic time zone
>and the user's civil time zone would require knowledge of the current
>number of leap seconds, not simply as now a fixed offset of an integral
>number of hours (mostly) between terrestrial time zones. However, to
>report accurately the timestamp on an old file or financial transaction
>the conversion would potentially require a record of all leap seconds
>ever applied.
I agree, it would require that computers keep an "almanac" of the past.
I don't think that's onerous for a computer. First of all, the operating
system only needs one copy of it, since all file times would be in
TAI. The form of it can be a table, or can be a polynomial approximation,
or a combination thereof.

This is already true. If you take Unix time, a 32 bit signed number,
or about 2 billion seconds, which is corrected to read the current time,
its going to be wrong for the Unix Epoch (Jan 1, 1970) by about 24 seconds
(according to the nearest table I could find of leap seconds).
the number of leap seconds since the Epoch to now. If someone created
a Unix file in 1970, the computer is going to need to pull out a trusty
table to figure out what time it was then in UTC. It shouldn't need to
use the table to figure out what time has passed SINCE the file was
created, since that is just time_now-time_of_file_create, in seconds,
but in reality it would, because (you assume) someone has been faithfully
correcting the Unix seconds clock to agree with leap seconds and UTC.
So that table, for 30 years, is a record of 24 leap seconds and what
date they were applied. Since Unix time is 32 bits, thats 24*32 bits
or 24 words, which is not going to break anyone's memory budget.

Of course you, I, and everyone knows that in reality nobody in Unix
land does this, they just live with 0-24 seconds worth of error. But
an interested user could well do it, or a quality Unix installation
could have the operating system do it for you.

I think the important distinction is that you are not looking to be
that accurate FOR THE USER. If the computer itself is using TAI, its
marking files, measuring time, and doing all of its internal work in TAI.
The conversion to solar time is done for the user's benefit, and that
only needs to be accurate to the second, which is all leap second time
gave you in any case.

Its certainly going to create a class of user that wants time stated in
the more accurate TAI format (scientists, GPS workers, astronomers), but
that's already happening.

At the risk of being redundant (sorry), this already has parallels with
other computer operations. Computers figure numbers in binary, convert
to and from decimal, have conversion errors, and nobody complains
because those errors are small. Programmers know that to maintain
accuracy, the numbers should be left in binary for storage in a file,
calculated in binary, and only converted as required to tell the user.

Similarly, TAI can be kept, calculated, stored, by the computer and
only converted to be printed for the user.

>Apparently this is considered to be too difficult and that it would be
>simpler, at least in the short term, to drop leap seconds from UTC,
>albeit with the controversial consequence of decoupling civil time from
>solar time.
>Mark Calabretta

Samiam is Scott A. Moore
Personal web site: http:/
My electronics engineering consulting site:
ISO 7185 Standard Pascal web site:
Classic Basic Games web site:
The IP Pascal web site, a high performance, highly portable ISO 7185 Pascal
compiler system:
Good does not always win. But good is more patient.
Received on Wed Aug 03 2005 - 22:48:48 PDT

This archive was generated by hypermail 2.3.0 : Sat Sep 04 2010 - 09:44:55 PDT