[ntp:questions] Getting SNTP to accept large corrections

Christopher Nelson cnelson at nycap.rr.com
Thu Jan 17 13:21:40 UTC 2008

On Jan 16, 8:14 pm, "Richard B. Gilbert" <rgilber... at comcast.net>
> Christopher Nelson wrote:
> > On Jan 16, 4:21 pm, da... at ex.djwhome.demon.co.uk.invalid (David
> > Woolley) wrote:
> >>In article <558d2358-f9b3-4696-9874-4d2e12c55... at t1g2000pra.googlegroups.com>,
> >>Christopher Nelson <cnel... at nycap.rr.com> wrote:
> >>>I have a system without a battery-backed clock and I want to get some
> >>>semblance of the right time at boot up using sntp.  Since the time
> >>>starts out decades off, I need to accept a large correction on my
> >>NTP timestamps are ambiguous over periods of several decades.  You need to
> >>preset the time to rather better than that before you run anything that
> >>depends on NTP.  In particular, anything that starts at the Unix epoch will
> >>not get the correct time from NTP.
> > That's an interesting idea.  I could have my startup script initialize
> > the time to something this decade so that the delta vs. the NTP-
> > provided time is only years.  Thanks.
> Why not initialize to 2008?  Next January make it 2009, etc.  It's low
> maintenance and puts you within 364 days, or less, of the correct time.

It's an embedded system.  The one I manufacture today can have today
(or this year) in it but I'll never touch it again to change the
initial time setting.  One thought I had was periodically write the
time to a file and use that file to initialize the clock at startup
before using NTP.

More information about the questions mailing list