Jon Callas <[email protected]> wrote:
> > On Aug 15, 2018, at 4:31 AM, Rob Stradling <[email protected]> wrote:
> >
> > 1970 != 1900, and (IINM) NTP time does not ignore leap seconds.

NTP's specification is amazingly opaque on this matter, but there is a
fixed offset between NTP time and POSIX time of (365*70 + 17) * 86400 ==
2,208,988,800 which is the "First day UNIX" value in the table in RFC 5905
section 6. You can see from the "Last day 20th Century" that NTP and Unix
apply leap seconds to their timestamps in the same way (i.e. they don't).

$ perl -MPOSIX -e 'print strftime "%F.%T\n", gmtime (3155587200 - 2208988800)'
1999-12-31.00:00:00

> I think that if you say, “64-bit, unsigned Unix time” it’s pretty
> well-defined. You could even explain once that it’s the number of
> seconds since 1 January 1970 UTC and then it’s defined about as
> completely as possible.

It isn't just the number of seconds since 1970-01-01 :-)

RFC 4034 summarizes it as:

   The Signature Expiration and Inception field values specify a date
   and time in the form of a 32-bit unsigned number of seconds elapsed
   since 1 January 1970 00:00:00 UTC, ignoring leap seconds, in network
   byte order.

POSIX time is defined in The Open Group Base Specifications Issue 7 /
IEEE Std 1003.1-2008, 2016 Edition, volume 1 (XBD) section 4.16 "Seconds
Since the Epoch"

http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/basedefs/V1_chap04.html#tag_04_16

Tony.
-- 
f.anthony.n.finch  <[email protected]>  http://dotat.at/
South Biscay: Northerly or northwesterly 4 or 5. Slight becoming moderate.
Rain for a time. Good, occasionally moderate.
_______________________________________________
Trans mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/trans

Reply via email to