[tz] JavaScript IANA date/time library, now with support for leap seconds, TAI, TDT

John Sauter John_Sauter at systemeyescomputerstore.com
Mon Apr 26 16:42:19 UTC 2021

On Thu, 2021-04-22 at 14:01 -0400, Kerry Shetline via tz wrote:
> I settled on the following scheme for resolving these issues, and I’m
> curious what others might think about it:
> * For all dates prior to 1957, estimated UT1 is in effect. This is
> most accurate back to 1600, for which there is sufficient
> astronomical data for reasonable approximate conversions from UT1 to
> TAI and dynamical time. Further back in time less accurate
> approximations are in effect.

This is good if the software is dealing with time as shown by a civil
clock, but not if it is dealing with time as a physical process.  For
example, if you want to know when an object dropped from a particular
height will hit the ground, you need to compute with fix-length
seconds.  The drop and hit times can then be converted to civil time
for display.

In looking at historical estimates of the rotation of the Earth based
on astronomical observations of occulations and eclipses, I found that
the values of UT1 are reliabe only since 1825.  (Nevertheless, my table
of proleptic leap seconds goes back to the year -2000.)

> * From 1957-1958, using a sliding weighted average, UT1 transitions
> to proleptic UTC.

I suspect it would be good enough, and less confusing, to make the
transition to proleptic UTC abrupt.

> * From 1958-1972 proleptic UTC, as proposed by Tony Finch (  
> https://fanf.livejournal.com/69586.html), is used, with the first
> non-official leap second occurring at 1959-06-30 23:59:60.

I have also used the work of Tony Finch in my proposal for a proleptic
UTC with leap seconds.

> * From 1972 up until the latest updates provided by the International
> Bureau of Weights and Measures, well-defined UTC prevails, with the
> first official leap second occurring at 1972-06-30 23:59:60.

Obviously the right approach.

> * For a year to 18 months after the current time, or after the last
> defined leap second (whichever is later), a presumed leap-second-free
> span of UTC is projected to occur.

The IERS predicts UT1-UTC for 12 months in advance--you could use that
to predict a leap second (or lack thereof) for the next 12 months.

> * A sliding weighted average transition from UTC to estimated UT1
> follows for the next 365 days.

The IERS also publishes a projection of the future value of UT2-UTC
which can be used for times more than a year in the future.

> * Formulaic predicted UT1 is used for all later dates and times
> thereafter.

An alternative would be to use the future predicted values of UT1 to
predict leap seconds.
    John Sauter (John_Sauter at systemeyescomputerstore.com)

get my PGP public key with gpg --locate-external-keys
John_Sauter at systemeyescomputerstore.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://mm.icann.org/pipermail/tz/attachments/20210426/54b7c412/attachment.sig>

More information about the tz mailing list