James S. Kaplan wrote:
> So, since some of us don't use e-smith, how would WE do this and
> what benefit over local time setting would there be and what about
> those who don't or won't use xntp?
First of all, to sync your computer to the world-mind's clock, you
ought to run ntpd. (task 1) (Is xntp a version of ntpd?) If you can't
because you're not always connected, a second choice is to
occasionally run ntpdate. (task 2) You can set up a cron job to run it
once a day or whatever. (task 3) That takes care of the problem of
keeping your clock in sync with the world.
The problem of resetting your clock for daylight savings time is
orthogonal to keeping your box in sync. If your box only runs Linux,
you probably told it to set its hardware clock to GMT. If you did, go
directly to task 6, you're done. Unix has known how to automatically
switch in and out of daylight savings time since it was invented. If
you didn't set your hardware clock to use GMT, why not do so now?
(task 4)
If you dual-boot an OS you've paid for but will never own (e.g.,
Windows), then you can't set your hardware clock to GMT, so you'll
have to let Windows do its thing. (task 5)
Then proceed to task 6.
Task 1: Install ntpd.
Look to see if your distro includes an ntpd RPM or deb or
whatever. If you find it, install it. Edit /etc/ntp.conf to
point to some nearby time servers. (Somebody in the Eugene
area want to name some nearby servers for cable, DSL or
university users?)
If your distro doesn't include ntpd, then get the source. The
ntpd official site is here.
http://www.eecis.udel.edu/~ntp/
Check your syslog and see that ntpd is muttering to itself.
Task 2: Run ntpdate.
ntpdate is part of the ntpd package. Install ntpd as above,
but turn it off after you install it. (chkconfig ntpd off on
redhat derived distros)
Then pick a time server and run ntpdate:
# ntpdate -s <server>
Task 3: Tell cron to run ntpdate once a day.
Edit crontab:
# crontab -e
Add a line to crontab that looks like this.
14 2 * * * /usr/local/bin/ntpdate -s <server>
That says to run the ntpdate command every morning
at 02:14. You can pick any time, and you should fill
in the correct path to ntpdate and a real server.
Task 4: Set your hardware clock to GMT.
On redhat-derived distros, edit /etc/sysconfig/clock and put
in a line that says "UTC=true". Then, to update your hardware
clock, type "hwclock --utc --systohc".
Would one of the Debianista like to tell us the Debian way to
set the HW clock to GMT?
Task 5: Help Windows into daylight savings time.
Boot Windows. See if it knows what time it is. If it
doesn't, fix it. Then reboot Linux. Smile at how much nicer
Linux is. See if Linux still knows what time it is. It
should.
Task 6: Have a refreshing cold beverage.
Go to the fridge, root cellar or cave, look over the bottles
and cans, and pick one you like. Open it by unscrewing,
prying, or smashing it appropriately. Lift container to lips,
tilt, and swallow the liquid.
Debian users can simply type:
apt-get upend eug-lug-lug-lug-lug
--
Bob Miller K<bob>
kbobsoft, LLC, software consulting
http://kbobsoft.com [EMAIL PROTECTED]