[ntp:questions] Re: using ntpd to initialise time instead of ntpdate sets wrong time.

Richard B. Gilbert rgilbert88 at comcast.net
Fri Apr 15 03:54:26 UTC 2005


Patrick Varney wrote:

> I've got an embedded linux machine whose initial time is 1, Jan, 1970. 
> When I use ntpdate to set the correct time at boot time it does this 
> correctly, but when I use ntpd to do this it sets the time backwards 
> to 1937. The debug shows that the offset is seen as a negative value. 
> The documentation suggests that ntpd -q can be used as a replacement 
> for ntpdate.
>
> If the client comes up when there's no server available, can the ntpd 
> client automatically sync. to the server when it does appear ? When 
> this happens, our time progresses from 1, Jan, 1970. I was thinking of 
> using 'tinker panic 0' so that the offset would always be accepted.
>
> Regards
>
> Patrick Varney

Try using the date command to set at least the correct year before 
starting ntpd!   If the year is more than thirty-something in error you 
can get some really wild behavior!  If you set the date to 1-JAN-2005 in 
your startup script, you should be okay for the next thirty years or 
so.  (and in thirty years, your successor will face a real mystery. . . 
.) :-)






More information about the questions mailing list