Messages in this thread | | | Date | Mon, 5 Jan 2009 19:47:20 +0000 | From | Alan Cox <> | Subject | Re: Bug: Status/Summary of slashdot leap-second crash on new years 2008-2009 |
| |
> > For any given time based on the 1970 Epoch there is a single correct > > answer for the translation between each value and a UTC time. > > This confused me because the sense that I've got from this thread > suggests otherwise. Unless I've misunderstood, the time() value for the > first second of 2009 is one greater than the value for the second to > last second of 2008 (i.e. 23:59:59), which means that there is no > translation for the last second. Put another way, my understanding of > what's been said is that the epoch is effectively increased by one > second for each leap second. Have I got this wrong?
No I should have said from a UTC time to a value, the reverse is slightly ambiguous - as you say leap seconds cannot be distinguished (well unless you are using floating point but thats a whole can of worms)
Glibc has /usr/share/zoneinfo/right as well as posix zones which I guess is Ulrich's vote on the subject.
In a strictly posix environment then for 1003.1 post 2001 the definition is non-leap seconds since (a notional) 1/1/70 UTC 00:00:00. Including leap seconds in the definition would have caused problems with existing date stamps moving them by about half a minute.
The kernel doesn't give a brass monkeys about interpretation on the whole with one main exception - the CMOS RTC time conversion is done without factoring in leap seconds.
Alan
| |