Leap Seconds

Ashley Yakeley ashley at semantic.org
Sat Nov 15 11:04:41 EST 2003

In article <SMARTHOST45hxpEBftO000a2292 at SMARTHOST.microsoft.com>,
 "Simon Marlow" <simonmar at microsoft.com> wrote:

> -- | Converts a 'ClockTime' to a 'CalendarTime' in UTC.  
> --
> --   Note that this function may produce unpredictable results for
> --   times sufficiently far in the future, because it is not known
> --   when leap seconds will need to be added to or subtracted from
> --   UTC.  Note that this doesn't apply if the timezone is TAI.
> --
> clockTimeToUTCTime :: ClockTime -> CalendarTime

Bear in mind that six months is "sufficiently far". That's all the 
notice we get of leap seconds (IERS Bulletin C). You can guess, of 
course, but that won't buy you more than a couple of years.

How do you intend to keep the leap second table up to date?

Also note that leap seconds are allowed to be negative. There's actually 
a possibility that that might happen in the next few years, and of 
course programmers who weren't paying attention to the rules will be 
caught out if that happens (though I've heard NTP is OK).

The rotation of the earth is quite unpredictable: indeed, such things as 
damming bodies of water close to the equator is enough to make a 
significant difference in "delta T".

Ashley Yakeley, Seattle WA

More information about the Libraries mailing list