S02 says that if pressed, an Instant will numify into a count of
atomic seconds since "the TAI epoch" - but what is the TAI epoch?  TAI
is normally expressed in the same terms as civil time - year, month,
date, hour, minute, second, fraction of second, according to the
Gregorian calendar, or else as a Julian Day number.  As such, it
doesn't really have an epoch built into the concept.

(And S32 refers to TAI *as* an epoch, which is inaccurate.  An epoch
is a particular instant; TAI is a system of measuring time.)

Using Instants as numbers is discouraged, but I still believe the
epoch should be part of the spec. Once we're requiring atomic time,
having the actual numeric value match is just a matter of adding a
constant to whatever the natural choice might be on a given
implementation.

As far as I can see, there are a few reasonable values; roll out the bike shed!

My first guess would be midnight on January 1st, 1958, which was when
the international atomic time standard was initialized (and
synchronized to universal time, specifically UT2), though it wasn't
called TAI until 1971.

1 Jan 1977 was when TAI started ticking at the current speed (before
that the atomic clock measurements were uncorrected for relativistic
effects due to the altitude of the clocks above sea level).

1 Jan 2000 is a nice round number and corresponds to the current epoch
used for astronomical calculations (though that's technically noon
Terrestrial Time, which was 11:59:27.816 TAI, and I think an exact
second in TAI makes more sense for an epoch.)

Before that point there wasn't an atomic time standard, but of course
you can continue to count atomic seconds backwards in time as far as
you like.  Since TAI moments are normally given using calendar dates,
you could use the epoch of the calendar, though you'll get a few more
digits in time values for the present.  But what is the epoch of our
calendar?   January 1st of the year 1?  Of the year 0 (a.k.a. 1 BC)?
Perhaps November 30th, 1 BC (which is the normalized result of asking
for day 0 of month 0 of year 0 when January is month 1)?  And
regardless of the above, is it that date in the Gregorian calendar we
now use, or the Julian calendar which was in effect (at least in Rome)
at the time?  Or the incorrectly-implemented variation on the Julian
calendar which was *really* in effect at that time?

TAI moments are sometimes given as Julian Days, so it might make sense
to use JD 0.0, though since that was noon UT on January 1st, 4713 BC
in the Julian calendar (November 24, 4714 BC in the Gregorian), you'll
even more digits.  Alternatively you could use  Modified Julian Day
0.0, which was midnight UT on November 17, 1858 (the epoch of VMS
system time).

I note that Rakudo currently uses the time_t value directly. I think 1
Jan 1970 is a poor choice of epoch for TAI time; having time values so
close to but not the same as time_t values would create undue
confusion.

--
Mark J. Reed <markjr...@gmail.com>

Reply via email to