Re: leap second
firstname.lastname@example.org wrote on 21.06.97 in <Pine.LNX.3.96.970621135723.7123Bemail@example.com>:
> Can someone explain to me exactly what POSIX time is? I was under the
It's just what you'd expect. Look at the calendar, get the timezone
difference (keeping in mind summertime laws), do the math, and get a
second counter. If a leap second happens, you just adjust your clock (or
let xntpd do it automatically).
The difference to the other variant is that the other variant _also_ looks
at leap seconds. xntpd won't do it right, and you'll have to adjust the
rules whenever a leap second happens - and you _know_ that localtime is
off by some unknowable amount (depending on how many leap seconds get
inserted or even removed) for all times in the future.
> impression that many computers on the net (at least ones belonging to big
> sites) grabbed their time from a radio signal broadcast by the U.S. Naval
> Observatory or some similar organization, and propagated the correct time
> from there. xntp is supposed to figure in network latency from a host with
> an authoritative notion of the time, right?
Yes, this works beautifully with POSIX time.
NTP is described in RFC 1305 (full version) and RFC 2030 (leaf node
version). Note that it uses a 32 bit second counter (and a 32 bit second
fraction) starting with the first second of the 20th century, UTC, and not
counting any leap seconds; instead, on the day where the time leaps, a
leap warning is sent out that indicates if we will have one second more or
As to the obvious overflow problems:
The counter got the most significant bit set in 1968. (That's about when
the work on the first variant of the Internet started.)
It will roll over in 2036, 39 years from now.
Software needs to already have a general idea of time to interpret
timestamps, that is, it needs to know something like the current
century. That's not a problem since NTP timestamps are not expected to
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .