Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Manually specify desired timeserver System
It did not occur to me until now that it actually is possible to edit the server field in the Date & Time preferences window and that it is thus possible to use any timeserver one would want to use -- not just those provided by Apple. Just select the existing text and type the address of the server you want to use.
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[4,539 views]  

Manually specify desired timeserver | 11 comments | Create New Account
Click here to return to the 'Manually specify desired timeserver' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Manually specify desired timeserver
Authored by: cleanhead on Wed, Apr 2 2008 at 7:37AM PDT
Or you could follow this hint from oh, about 2001.

[ Reply to This | # ]
Manually specify desired timeserver
Authored by: _Gekko_ on Fri, Apr 4 2008 at 9:15PM PDT
Searching for "timeserver" in the Hints only gave me a hint about Windows XP. The hint you refer to was unknown to me ...

[ Reply to This | # ]
Manually specify desired timeserver
Authored by: brett_x on Wed, Apr 2 2008 at 8:45AM PDT
This is a hint? I hope I can add validity by adding to it.
That field is not restricted to just one time server. You can put in multiple time servers separated by commas. This is helpful if you have laptops and your company has a proxy server to get to the internet (so you can't reach Apple's time server). You can use an internal ntp server while in the office, and use time.apple.com when you're outside the company's firewall.



[ Reply to This | # ]
Manually specify desired timeserver
Authored by: bassmaster_jeff on Wed, Apr 2 2008 at 5:59PM PDT
In Leopard, you can use spaces (instead of commas) between potential NTP servers:

Example: 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org

Results in the following written to your /etc/ntp.conf file once you navigate away from Date & Time.

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org


[ Reply to This | # ]
Manually specify desired timeserver
Authored by: ekc on Wed, Apr 2 2008 at 9:06AM PDT
brett_x wrote:
You can use an internal ntp server while in the office...
How do you go about setting this up? I would love to have one Mac serving time to all the others, and everything I have read about ntpd suggests that this should be easy enough to configure, but I have never managed to get it to work. Ah well...

[ Reply to This | # ]
Manually specify desired timeserver
Authored by: leamanc on Wed, Apr 2 2008 at 9:57AM PDT
Don't know about OS X, but ntpd is dead simple to set up on Linux. Just find an old box, install a simple distribution on it and enjoy your local time server. We do that at my work and, while it doesn't save us a ton of bandwidth, any little bit helps.

[ Reply to This | # ]
Manually specify desired timeserver
Authored by: ekc on Wed, Apr 2 2008 at 1:03PM PDT
Hey, I just realized they finally fixed the problem in Leopard! I can now sync all the computers in the office to one running Leopard. Hmm...this might deserve a hint of its own...

[ Reply to This | # ]
Manually specify desired timeserver
Authored by: PopMcGee on Wed, Apr 2 2008 at 11:37AM PDT
This will also stop your computer from "calling home" to apple.com every day, which might be welcome if you are privacy-conscious.

[ Reply to This | # ]
ntp pool
Authored by: goatbar on Wed, Apr 2 2008 at 3:01PM PDT
my /etc/ntp.conf looks like this to use the ntp pool... This works for people in the US
<blockquote>
server 0.us.pool.ntp.org minpoll 12 maxpoll 17
server 1.us.pool.ntp.org minpoll 12 maxpoll 17
server 2.us.pool.ntp.org minpoll 12 maxpoll 17
server 3.us.pool.ntp.org minpoll 12 maxpoll 17
server 0.north-america.pool.ntp.org minpoll 12 maxpoll 17
server 1.north-america.pool.ntp.org minpoll 12 maxpoll 17
server 2.north-america.pool.ntp.org minpoll 12 maxpoll 17
server 127.127.1.0 minpoll 12 maxpoll 17
</blockquote>
Then use this to get stats of what you are using:
<blockquote>
ntpq -p -n
</blockquote>

See http://www.pool.ntp.org/

[ Reply to This | # ]
Manually specify desired timeserver
Authored by: axd on Thu, Apr 3 2008 at 11:16AM PDT
or you edit /etc/ntp.conf...

[ Reply to This | # ]
Control the Network Time Server settings from the command line
Authored by: rsnyder on Mon, Apr 7 2008 at 10:25AM PDT

From the command line you can use the systemsetup command to interact with the time server settings. This can particularly users who are managing headless OS X boxes that experience the time drift issue.

One of the downsides of the GUI System Preferences tools is that in the case of updating the system time requires that you open the Date and Time system preferences pane to trigger an update.

I manage several dozen OS X server boxes, and this issue causes my servers to drift out of sync, leading to all sorts of problems.

But creating a script that uses the network time server functions of the systemsetup command, combined with crontab, to force resyncing on a regular basis.

The available commands are:

Viewing or Changing Network Time Server Usage

To see if a network time server is being used:
$ sudo systemsetup -getusingnetworktime

To enable or disable use of a network time server:
$ sudo systemsetup -setusingnetworktime (on|off)

To view the current network time server:
$ sudo systemsetup -getnetworktimeserver

To specify a network time server:
$ sudo systemsetup -setnetworktimeserver timeserver

While this is a rather ham-handed way of doing things, creating a script that turns the use of the network time server off and then back on again will force the system to synchronize its clock with your desired time server. Create a cron job that runs the script as root once a day, or once a week, and you should no longer have problems with drifting time.

[ Reply to This | # ]