Mark J. Reed wrote:
I think there's some confusion around the term "epoch" in this doc.
TAI is not an "epoch", and neither is a time value measured in fixed
units from some starting point. The starting point is the epoch.   One
may speak of the UNIX epoch (January 1, 1970 at midnight GMT), but the
current time_t value is not an "epoch" or "epoch value".

TAI doesn't really have a well-defined epoch.  You could make a case
for the logical starting point of the Gregorian calendar,
01-01-01T00:00:00 (or even 00-00-00T00:00:00, which maps to November
30, 2 BC in more conventional notation).  Or you could use the instant
that the original version of TAI went into effect
(1958-01-01T00:00:00), or the instant that the current
(relativistically-corrected for gravity) version went into effect
(1977-01-01T00:00:00).  The latter instant is itself used as the epoch
of some astronomical time scales (Barycentric Coordinate Time,
Geocentric Coordinate Time, and Terrestrial Time).  But whatever epoch
you choose to count your TAI seconds from, the value you wind up with
for any other instant is not itself an "epoch."

I would change the doc to refer to TAI as a "time scale", and also
avoid referring to the numerical value of an Instant as an "epoch".

Larry already gave definitions of the TAI types under discussion, in S02 ( http://perlcabal.org/syn/S02.html#Immutable_types ) so what's put in S32 should be compatible with that, and if a case can be made that the S02 type needs more precision then that would need to be discussed.

"Instants and Durations are measured in atomic seconds with fractions. Notionally they are real numbers which may be implemented in either Num or Rat types. (Fixed-point implementations are strongly discouraged.) Interfaces that take Duration arguments, such as sleep(), may also take Num arguments, but Instant arguments must be explicitly created via any of various culturally aware time specification APIs that, by and large, are outside the CORE of Perl 6, with the possible exception of a constructor taking a native TAI value. In numeric context a Duration happily returns a Num representing seconds. If pressed for a number, an Instant will return the length of time in atomic seconds from the TAI epoch, but it will be unhappy about it. Systems which cannot provide a steady time base, such as POSIX systems, will simply have to make their best guess as to the correct atomic time."

This said, the S02 definition should be made more specific as to whether it is counting from the 1958 epoch or the 1977 one; presumably the former is implied now if it says "TAI".

-- Darren Duncan

Reply via email to