[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] current-posix-second is a disastrous mistake



   Date: Thu, 16 Dec 2010 12:15:46 -0500
   From: John Cowan <cowan@x>

   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.

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports