Re: Setting the date and time

Michael H. Warfield (mhw@wittsend.com)
Sat, 9 Oct 1999 10:36:57 -0400


On Sat, Oct 09, 1999 at 02:19:40PM +0000, Richard Adams wrote:
> On Sat, 09 Oct 1999, Buddy Brannan wrote:
> >Which brings up another question. For such accurate and recise machines,
> >computers are lousy clocks. At least, PC's are. So is there some way that
> >one can set the computer's clock (and date, presumably) automagically from
> >the Net, presumably from something with the correct time?

> rdate -s <your_isp's_time_server>
> clock

Uh... Don't you mean "clock -w"? On my RedHat system, "clock"
will read the PC clock chip and set the date and time to it. That would
undo what you just did with the "rdate" command. On the other hand,
"clock -w" will write the current system date and time to the PC clock
chip, synchronizing it to the time you just retrieved.

BTW... I prefer ntpdate and xntpd to maintain tight time
synchronization. It's in the xntp package.

> I have that in a rc script which gets executed at boottime and once a
> day via cron.

With xntp, you don't need to run rdate each day and you are not
subjected to once per day timewarps when the time suddenly jumps from
what it was to what rdate sets it to. Xntpd keeps the system in sync
by adjusting the clock and maintaining information on it's rate of drift.
This may not be so good if you are on a dialup system, however. If you
are on a dedicated link, it works great.

> >Thanks.

> >Buddy
> --
> Regards Richard
> pa3gcu@zeelandnet.nl
> http://people.zeelandnet.nl/pa3gcu/

Mike

-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 331-2437   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/