[time-nuts] Leap Quirks

M. Warner Losh imp at bsdimp.com
Sat Jan 3 17:37:25 UTC 2009


In message: <m31vvks3e9.fsf at lugabout.jhcloos.org>
            James Cloos <cloos at jhcloos.com> writes:
: >>>>> "Chuck" == Chuck Harris <cfharris at erols.com> writes:
: 
: Chuck> The message implies that linux clocks counted:
: 
: Chuck> 58..59..60..00..01
: 
: Chuck> Which would not be the POSIX way.
: 
: No, the linux clocks counted:
: 
: 1230768021..1230768022..1230768023..1230768024..1230768025
: 
: where 1230768024 is 2009-01-01 00:00:00 UTC.
: 
: What gets output by any given userland apps depends on those apps.
: 
: If one uses the Olsen tz database, the right zonefiles rather than the
: posix zonefiles, and a libc such as glibc, then one will have seen the
: seconds tick off 58..59..60..00..01.
: 
: But that is purely a userland issue.
: 
: If one uses the (lobotomized) posix zonefiles, one will have seen the
: seconds tick off 21..22..23..24..25.
: 
: (Interesting coincidence there, that 1970 through 2008 (inclusive) has a
: number of days divisible by 5.  Which makes for a nice, even 1230768000
: seconds, were there no leap seconds.)

That doesn't match POSIX's mandated behavior...  time_t % 86400 == 0
at midnight is an invariant that's violated by the above sequence.  

Warner



More information about the time-nuts mailing list