[AFS3-std] Re: A call for consensus on draft-deason-afs3-type-time-02
Russ Allbery
rra@stanford.edu
Mon, 01 Aug 2011 14:30:35 -0700
Jeffrey Altman <jaltman@secure-endpoints.com> 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 (rra@stanford.edu) <http://www.eyrie.org/~eagle/>