On Jul 9, 2012, at 9:06 AM, Rob Seaman wrote: > On Jul 9, 2012, at 7:11 AM, Warner Losh wrote: > >> There's four different Unix implementations of leap seconds >> >> (1) Repeat the first second of the next day. >> (2) Repeat the last second of leap day. >> (3) Freeze time >> (4) slew it in over many hours. > > Just to echo a well traveled talking point here, note that none of these is > actually compliant with UTC. Actual UTC compliance would be simpler to > implement. UTC is just an overlay on an unending stream of TAI seconds. The > reality is there is no leap second.
Except that isn't POSIX time_t compliant, alas. That's the other variation I forgot, which is to use the "right" timezone files, which also have their own set of problems for long-running applications (a variation on getting the UTC leap second tables problem). I've gone on at length in other forums why this is clever, but not a complete solution. Also, a never ending stream of TAI seconds is easy to count, but hard to convert to UTC since you need a leap second table to do that. This can present problems to applications that need to present a UTC time to the outside world that have been off for a while. GPS can give you the current TAI time very quickly, but cannot give you the UTC time until it has downloaded the almanac (especially if the device has been off > 6 months). Warner _______________________________________________ LEAPSECS mailing list LEAPSECS@leapsecond.com http://six.pairlist.net/mailman/listinfo/leapsecs