Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-18-2001, 03:22 PM   #1
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
Updating System time from some Inet time server

Hi everybody, I just stumbled across XP getting its time from microsoft on every boot. I'd love for my Linux-box to get its system time from some time-server on the internet, too!

There's gotta be a way... I just don't know how!

I guess I need
a: some kind of prog/shell script to update the time
b: The URL/IP of a reliable time-server

Old 12-18-2001, 04:48 PM   #2
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
it's an absolute doddle.

you use rdate locally, and just need to find a decent time server. i found some, but i can't remember the address...

gone surfing....

their servers seem good enough, and the other info there might be useful. BUT you don't really need all that.... assuming you're online no boot... stick this in your rc.local

rdate -s

come on... could it get an easier?!
Old 12-19-2001, 11:36 AM   #3
LQ Guru
Registered: Aug 2001
Location: Dublin, Ireland
Distribution: Slackware
Posts: 5,700

Rep: Reputation: 65
This is basically the same thing Bluecat is pointing out, but the standalone as opposed to the server.

If you dig compiling things on your own, try this little toy. I think this is exactly what you're aiming for. Scuttlebutt is that MS ripped off this code.

The best way to use it is:

netdate ntp1.(insert major university here).edu

No kidding, pretty much every college and a lot of business run time servers. These tier 1 time servers in turn update from the Cesium clock and blah blah blah super geekdom. Best to choose one in your timezone though :P

Then just stuff the line in rc.local and time is set every boot.



Last edited by finegan; 12-19-2001 at 11:39 AM.
Old 12-19-2001, 11:47 AM   #4
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Original Poster
Rep: Reputation: 30
Thanx everyone! Got that figured out... Even found some "administrative" time server for my time zone!

If anyones interested: Timezone:

CET (Germany, France, ...) or

See ya!
Old 12-20-2001, 09:47 AM   #5
Registered: Oct 2001
Location: Lilburn, Ga.
Distribution: RH
Posts: 77

Rep: Reputation: 15
The way this is done, generally, is called NTP, the Network Time Protocol. Atomic clocks around the world make this available. Need to run xntpd, small, and requires no attention at all. I did a page for RH and Deb at:
HTH, Ray
Old 12-20-2001, 09:07 PM   #6
Registered: Dec 2001
Location: Oklahoma City, OK, USA
Distribution: Xubuntu 16.04 LTS
Posts: 214
Blog Entries: 1

Rep: Reputation: 39

I like Trevor's approach best, but since I try not to reboot very often I put the rdate command into a script and stored it in my /etc/cron.daily directory. This way it updates at 4 a.m. every morning rather than waiting for a reboot that may not happen for weeks! I didn't have rdate installed on my system, but it was on the Mandrake CDs and took only a few minutes to get it rolling. The technique for getting cron to do it may vary for other distributions; I'm using Mandrake 8.1...
Old 12-21-2001, 02:12 PM   #7
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
well, it seems a little like overkill to me, running a daemon just to make sure the ime is right. Why should there be any reason to think that the clocks were wrong in the first place. i only sussed out what i did cos the clocks in my network were wonky, so pinging always gave me that annoying 'taking counter measures' message and such like. i can guess that the mem usage of ntpd it pretty minimal, but throwing resources around like that... nrrg , no thanks. i would also even think that setting the clock form a server online every single timei turn the computer on is a bit daft in principle, but it forks into the backgorund for the 3 seconds it's running for... so that can be ignored really. the cron option is the other obvious choice. any more measures than that i think are a bit daft tho. But then on a critical system it might be appropriate.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to set and sync system time with time server?? servnov Linux - Newbie 6 12-03-2013 07:55 PM
Setting the system clock to a time server? orange400 Linux - General 4 06-13-2005 01:59 PM
How to syncronize my system time by public time server? hakansun Linux - Networking 1 09-10-2004 05:10 AM
Setting System Time: kernel in wrong time zone warrenweiss Linux - General 7 05-15-2004 03:25 PM
System will automatically close my x server after a certain idle time. ICO Slackware 1 02-16-2004 11:26 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration