[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Interesting "Problem"



"Andrew D Dixon" <andrew.dixon@seranoa.com> writes:

> David Schleef wrote:
> 
> > On Fri, May 25, 2001 at 03:44:37PM +0200, Michel Dänzer wrote:
> > > Russell Hires wrote:
> > >
> > > > I'm playing with the date command, trying to understand why it doesn't
> > > > pick up the current time/date from ntpdate/ntpd...
> > >
> > > ntpdate sometimes fails when the date is too far off. Setting the date
> > > manually and then running ntpdate usually works for me.
> >
> > I've noticed this as well, after I crash the machine really
> > hard.  The RTC gets set to 1904, and ntpdate doesn't seem to handle
> > times that are outside the current epoch.  Does anyone know if this
> > is this a limitation or bug with ntpdate or the kernel interface for the
> > real-time clock?
> 
> I just used ntpdate to set the clock to the curent UTC from 0 (jan 1 1970) with
> out a problem so this problem probably isn't simply related to how far your
> deviating from the time given by the server.

Right. I just set my clock to Jan 1 1904, and used ntpdate. 
amadeus:/dev# date -s "Jan 1 12:05:00 1904"
Fri Jan  1 12:05:00 MST 1904
amadeus:/dev# ntpdate ntp.cs.unm.edu 
 7 May 07:53:19 ntpdate[16646]: step time server 64.106.20.32 offset 926106473.917452 sec
amadeus:/dev# date
Sun May  7 07:53:22 MST 1933

Using date to set it to Jan 1 2001, and then using ntpdate worked
fine. It seems ntpdate gets confused when the date is negative
compared to the epoch.

jas.



Reply to: