The
systemsetup -getnetworktimeserver
command can be used on
a Mac OS X system to determine the time server with which the system's
clock is being synchronized.. You need administrator access to utilize the
command; you can use sudo to run it if your account has administrative
privileges.$ systemsetup -getnetworktimeserver You need administrator access to run this tool... exiting! $ sudo systemsetup -getnetworktimeserver Password: Network Time Server: ntp.example.com
You can set the
Network
Time Protocol (NTP) server with which the system will
synchronize its clock by specifying -setnetworktimeserver
,
instead. E.g.:
$ systemsetup -setnetworktimeserver us.pool.ntp.org
You can query an NTP server with the sntp
command.
$ sntp us.pool.ntp.org 2015 May 14 22:50:29.664176 +4.438430 +/- 0.099854 secs