Re: Setting clock in Linux

From: Keith Brown <brownk_at_no.spam.please>
Date: Fri Sep 03 1999 - 10:04:28 CST

> Is there a mechanism where I can set the time on a PC that is on-line.
> I figure a crond entry that calls on date but I don't know of any services
> on the net that will give me an accurate time. Also I guess that since the
> packet transfers are non-deterministic, It would not be accurate to the
> second.

   I use a program called 'nist'. It gets fired up once a day on my office
machine via cron and a short script. The cron entry looks like this:

# This updates the system time
40 06 * * * /sbin/settime

The script 'settime' looks like this:

#This shell program sets the system time using the NIST timeserver
#(nist.txt in /usr/src/nist) and then sets the CMOS time from the
#system time.
/usr/local/bin/nist -q -t -a -06:00:00
/sbin/clock -w

I've made the source and binary available for anonymous ftp at in the 'pub' directory.

Keith Brown
University of Saskatchewan
Saskatoon, Saskatchewan

If Bill Gates had a nickel for every time Windows crashed...
...oh wait, he does.
Can't understand why the new millennium starts on January 1, 2001? Look at (US Naval Observatory), (Greenwich, England) and

Saskatoon Linux Group Mailing List.
To unsubscribe, send mail to
'' with
'unsubscribe' in the body.
Received on Fri Sep 3 10:04:28 1999

This archive was generated by hypermail 2.1.8 : Sun Jan 09 2005 - 13:53:59 CST