Re: current-posix-second is a disastrous mistake Taylor R Campbell 17 Dec 2010 02:18 UTC

   Date: Thu, 16 Dec 2010 12:15:46 -0500
   From: John Cowan <cowan-x6Fv9fcoW1Y+uZM1RHzMvw@public.gmane.org>

   Taylor R Campbell scripsit:

   > Systems that implement SECONDS-SINCE-UTC-EPOCH using a POSIX clock
   > should document that users must be prepared to tolerate a clock in
   > error by more than 1 SI second.

   To say so would be disingenuous, since trying to implement SECONDS-SINCE-
   UTC-EPOCH with a Posix clock alone means users must be prepared to
   tolerate a clock in error by *any* number of SI seconds.

Given a perfect POSIX clock and a leap second table, one can implement
SECONDS-SINCE-UTC-EPOCH to within 1s of error.  (No POSIX clock is
perfect, of course, so the bound cannot be tight.)  The error of 1s
arises because even if it is adjusted using a leap second table, a
POSIX clock fails to distinguish the seconds 2008-12-31T23:59:60Z and
2009-01-01T00:00:00Z.