Time Libraries Rough Draft

David Menendez zednenem at psualum.com
Sat Feb 12 13:48:41 EST 2005


Aaron Denney writes:

> On 2005-02-12, David Menendez <zednenem at psualum.com> wrote:
> >
> > This could be correct, but my understanding is that TAI and UTC are
> > both calendars that are based on the same clock. The difference is
> > that the UTC clock/calendar conversion requires a leap-second table
> > and the TAI conversion does not.
> 
> It's one way of looking at it, but not the most insightful, IMO.  The
> "dates" that TAI provides need bear no relationship to the times and
> days we're comftorable with.

No relationship? As I understand it, the only real difference between
UTC and TAI the tradeoffs they make. TAI prioritzes constant durations
for its units, and UTC prioritizes tracking the irregular rotation of
the Earth. TAI agrees with the common definition that a minute is 60
seconds, and UTC approximates the common definition that a day
corresponds to one rotation of the Earth. You can't do both unless you
mess with the definition of a second, like UT1.

> > The problem is that NTP is based on a different clock
> 
> True.
> 
> > where some seconds are longer than others.
> 
> No.  NTP time is a straight count of SI seconds, and includes
> information about whether there is a leap second in the current day,
> but _drifts_ the epoch against which it is defined by the number of
> leap seconds that have passed.

My mistake.

The problem with drifting the epoch is that it complicates
clock/calendar conversions for times in the past. That is, a function
secondsFromEpoch :: CalendarTime -> ClockTime will return different
values for the same input if it is evaluated at different times.
-- 
David Menendez <zednenem at psualum.com> <http://www.eyrie.org/~zednenem/>


More information about the Libraries mailing list