[ntp:questions] ntpd sets clock to the year 1939
robert.dodier at gmail.com
Mon Mar 26 18:48:16 UTC 2007
I am working with embedded Linux systems (Gumstix) which appear to
a persistent clock so whenever they are rebooted, their system clocks
back to January 1, 1970. I am hoping to use ntpd to set the clock on
systems but I am getting an unexpected result.
When I run ntpd on the Gumstix, without the -g option it complains
time difference between the local clock and the server is too great.
OK, I expected that. However, when I run it again with -g, ntpd
makes a big adjustment in the local time ... changing it from 1970 to
1939 for some reason. I tried a couple of different servers but got
Here's the content of /etc/ntp.conf (sans most of the comments):
restrict default nomodify notrap noquery
# server 0.pool.ntp.org
# server 1.pool.ntp.org
# server 2.pool.ntp.org
Here's the output from /var/log/messages.
The first output is without -g option and second one is with -g.
Dec 31 16:04:34 gumstix daemon.err ntpd: time correction of
-972551638 seconds exceeds sanity limit (1000); set clock manually to
the correct UTC time.
Mar 8 06:51:15 gumstix daemon.notice ntpd: time reset
Now -972551637 = -31 years, approximately, so that's how the date is
set to 1939
from 1970. However, it is not a simple sign inversion: the correct
should be more like +37 years.
I'm really stumped. Any light you can shed on this problem is much
More information about the questions