|
|
Log in / Subscribe / Register

A rift in the NTP world

A rift in the NTP world

Posted Feb 10, 2017 15:51 UTC (Fri) by mtaht (guest, #11087)
In reply to: A rift in the NTP world by xav
Parent article: A rift in the NTP world

No, I meant the 2036 problem.

"The 64-bit timestamps used by NTP consist of a 32-bit part for seconds and a 32-bit part for fractional second, giving NTP a time scale that rolls over every 232 seconds (136 years) and a theoretical resolution of 2−32 seconds (233 picoseconds). NTP uses an epoch of 1 January 1900. The first rollover occurs in 2036, prior to the UNIX year 2038 problem.
Implementations should disambiguate NTP time using a knowledge of the approximate time from other sources. Since NTP only works with the differences between timestamps and never their absolute values, the wraparound is invisible as long as the timestamps are within 68 years of each other. This means that for NTP the rollover will be invisible for most running systems, since they will have the correct time to within a very small tolerance. However, systems that are starting up need to know the date within no more than 68 years. ": https://en.wikipedia.org/wiki/Year_2038_problem

I still expect a huge number of systems starting up to not have a battery by then.


to post comments

A rift in the NTP world

Posted Feb 10, 2017 18:31 UTC (Fri) by excors (subscriber, #95769) [Link]

Shouldn't it be trivial for software to determine whether it's currently running in 1900 or in 2036, given that there were no digital computers in 1900? The only ambiguity should be for devices that are still in active use 136 years after their software was written, and there won't be any of those any time soon.

A rift in the NTP world

Posted Feb 10, 2017 21:45 UTC (Fri) by flussence (guest, #85566) [Link] (1 responses)

(To spare anyone else the confusion: those numbers outside the parentheses should read 2³² and 2⁻³² respectively :)

I'd say something about picoseconds being overkill for a timestamp sent over any length of network, but I guess someone somewhere really needs that. TAI64 goes all the way down to attoseconds(!)

A rift in the NTP world

Posted Feb 11, 2017 20:52 UTC (Sat) by da4089 (subscriber, #1195) [Link]

Check out the White Rabbit project at CERN, for one example.

A rift in the NTP world

Posted Feb 12, 2017 18:10 UTC (Sun) by smcv (subscriber, #53363) [Link] (1 responses)

> However, systems that are starting up need to know the date within no more than 68 years

I like systemd's trick for dealing with this: during early boot, if the kernel clock is before the date/time on which this particular version of systemd was compiled, it brings the clock forward to that date/time.

As long as you don't leave a device for decades without upgrading its OS, and rebuild systemd at least every few years (either for a security or other bug fix, or just artificially to get a newer timestamp), that's good enough.

There'd be nothing to stop the kernel doing the same trick with its own release or compilation date/time.

A rift in the NTP world

Posted Feb 13, 2017 1:31 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

Note that with SOURCE_DATE_EPOCH from reproducible build efforts will make that date the date of the release or tag or some other static timestamp rather than "when this binary was built".


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds