Lancia
06-14-2002, 03:22 PM
How can I set my server's clock with an atomic clock? Everything I have found on the web requires installing software and many other complicated commands, while I know I have done it before with a simple one-liner containing the address to an atomic clock. But, I can't remember it! Can anyone help?
allan
06-14-2002, 03:33 PM
Well, you need NTP software, which may be preinstalled, but it is available as a simple RPM program:
http://www.ntp.org
Then pick a public and NTP server and synchronize.
AQHost
06-14-2002, 03:49 PM
Windows 2000 Professional/Server:
Drop out to a command prompt then enter:
net time /setsntp:time.nist.gov
<enter>
at 23:30 /every:Su "net time /set"
That would set the time at 23:30 every Sunday.
Linux:
Add the following to /etc/rc.d/rc.local or just run it from the command line (must be run as root):
rdate -s time.nist.gov
Best wishes,
Simon
Studio64
06-15-2002, 06:25 AM
Originally posted by AQHost
Windows 2000 Professional/Server:
Drop out to a command prompt then enter:
net time /setsntp:time.nist.gov
<enter>
at 23:30 /every:Su "net time /set"
That would set the time at 23:30 every Sunday.
Wouldn't it be
at 23:30 /every:Su "net time /setsntp:time.nist.gov"
I believe... correct me if I'm wrong...
AQHost
06-15-2002, 07:33 AM
Nope. The first line sets the default server, the second line executes the command on schedule. I know it works as I have it set on my system.
Best wishes,
Simon
>>Edit<< Actually both ways work. My way sets the default server first then just runs the job. Your way sets the server each time the job runs. Neither is any more right than the other :)
and if you have windows xp, double click on the time in the bottom right corner, click the internet time tab, and put in the time server and hit update now.
Lancia
06-15-2002, 03:43 PM
Originally posted by AQHost
Windows 2000 Professional/Server:
Drop out to a command prompt then enter:
net time /setsntp:time.nist.gov
<enter>
at 23:30 /every:Su "net time /set"
That would set the time at 23:30 every Sunday.
Linux:
Add the following to /etc/rc.d/rc.local or just run it from the command line (must be run as root):
rdate -s time.nist.gov
Best wishes,
Simon Thank you so much, Simon! :)
matt2kjones
06-16-2002, 12:41 PM
hi i tried this on my windows 2000 server, i put the clock 1 hour wrong, run this command, and the time doesn't change?
AQHost
06-16-2002, 12:44 PM
Studio64 was right. That's what I get for posting with a low caffeine level :homer:
You need:
at 23:30 /every:Su "net time /setsntp:time.nist.gov"
Apologies to anyone who I managed to confuse with my original incorrect post.
Best wishes,
Simon