Jeffrey Altman <[email protected]> writes:
> Provide times for a few known leap seconds and I can test those as well.
Leap seconds are always added as 23:60 on June 30th or December 31st.
There's a table at:
http://en.wikipedia.org/wiki/Leap_second
of all the leap seconds that have been added historically. So:
1972-06-30 23:59:59
1972-06-30 23:59:60
1972-07-01 00:00:00
for example. One of the interesting questions is whether conversion of
the first and last calendar times above are, when represented as
timestamps, one second apart or two seconds apart.
Note that, in POSIX, they're one second apart, because POSIX time contains
no leap seconds by definition (which means that it's not really possible
to accurately represent those dates).
On UNIX systems, using mktime on those dates will generally convert as
follows:
1972-06-30 23:59:59 78821999
1972-06-30 23:59:60 78822000
1972-07-01 00:00:00 78822000
There's not really a "right" answer here; we just need to say what the
answer is.
--
Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>
_______________________________________________
AFS3-standardization mailing list
[email protected]
http://lists.openafs.org/mailman/listinfo/afs3-standardization