Time

Ketil Malde ketil+haskell at ii.uib.no
Thu Jan 27 03:00:33 EST 2005


Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> writes:

>> Yes timing between point in time should be independant of leap
>> seconds, so if a program, takes 5 seconds to run it should always
>> take 5 seconds, even if it runs accross midnight.

> How would you implement it, given that gettimeofday() and other Unix
> calls which return the current time either gradually slow down near a
> leap second (if NTP is used to synchronize clocks) or the clock is not
> adjusted at all, and at the next time it is set it will just be on
> average one second later (if it is being set manually)?

So, the choice is either UTC, which corresponds to what most Unix
(and other?) computers provide, but will generally be inaccurate in
the presence of leap seconds.  Or we can use TAI, which will in most
cases have to be converted from UTC, and thus inherit all its
inaccuracies in spite of its theoretically nice properties. 

At least with TAI it seems like if it would be possible to configure a
system to do the right thing, so I would still vote for that (and
as for Posix compatibility, well, it sucks in so many other ways
anyway :-) 

(GPS doesn't use leap seconds either, btw)

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Libraries mailing list