System.Time.Clock Design Issues

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Thu Feb 3 21:03:54 EST 2005


Benjamin Franksen <benjamin.franksen at bessy.de> writes:

>> > Therefore, TAI + calendar + (optional) a fixed offset.
>> >
>> > What am I missing?
>>
>> That you don't know the correct offset.
>>
>> If a program begins miscalculating the time when it's run 6 months
>> after the Haskell compiler it was compiled with was been updated,
>> and thus programs compiled using different versions of the compiler
>> interpret the same timestamp differently, this makes no sense.
>
> No problem if the leap second table used is a parameter of the
> conversion.

You shift the responsibility without eliminating the problem. The
program begins miscalculating the time when it's run 6 months after
its author has updated the leap second table which the program uses.

Of course it's impossible to solve it. This means that conversion
between TAI and UTC should be avoided when possible.

If the user wants to obtain UTC, doesn't mind a hiccup on leap seconds,
and doesn't want to keep a leap second table up to date and arrange
for a long-running program to reread it when it changes - he can set
the system clock to UTC and the program should then interpret the
system clock as UTC.

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/


More information about the Libraries mailing list