pmak0
Jan 4 2002, 07:08 AM
Does anyone have the address of a public rdate server that I can use to synchronize my time? Preferably one that is both on the RackShack network and accurate.
winston
Jan 4 2002, 12:44 PM
QUOTE
Originally posted by pmak0
Does anyone have the address of a public rdate server that I can use to synchronize my time? Preferably one that is both on the RackShack network and accurate.
Try ntp.nasa.gov.
I believe it's based on an atomic clock, so it's pretty accurate
(I have an rdate -s ntp.nasa.gov in my /etc/rc.local because for some reason, after a reboot, my server has the time off by usually several months).
yenne
Jan 4 2002, 03:21 PM
winston -- if you want to fix your hardware clock so that your system boots with a reasonable time:
man hwclock
-britt
A closed mouth gathers no feet.
pmak0
Jan 4 2002, 08:04 PM
> if you want to fix your hardware clock so that your
> system boots with a reasonable time:
> man hwclock
So, am I right in saying that the hardware clock keeps a separate time from what "date" sets, and when a machine is rebooted, the software date reverts back to the value of the hardware clock?
Does that mean I should put this in /etc/rc.d/rc.local:
rdate -s ntp.nasa.gov
hwclock --systohc
yenne
Jan 4 2002, 08:40 PM
Yes, and that's what I do, except that I have it in a script and I run it every morning at about 2am as well. No problems.
Also, I say to read the manpage because it can vary by Linux flavor, and certainly by architecture.
-britt
A bird in the hand can be messy.
mmoncur
Jan 5 2002, 12:22 AM
OK, I know this has been mentioned before but I can't find it, it's one of those things that's too obvious and general to be easy to find in a search engine.
How do I set the timezone of my server?
I want to use rdate in a cron job, but the server defaults to EST, and I want it to use MST for my own convenience.
Thanks!
pmak0
Jan 5 2002, 12:40 AM
As root, type:
ln -sf /usr/share/zoneinfo/MST /etc/localtime
Then type "date" to verify that it worked.
The /usr/share path may be /usr/lib instead on your system; check it out first.
mmoncur
Jan 5 2002, 03:04 AM
Ah! I knew it was simple. Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.