Using vmware I always suspend my mac-os machine, so the time at revival is never correct… so how to force a time-synch:
Mojave still uses
ntpdate and the helpers
ntpq are removed. To check and update your system time, you can call
$ sudo sntp -sS pool.ntp.org Password: sntp firstname.lastname@example.org Tue Mar 21 14:36:42 UTC 2017 (136.200.1~2533) 2018-09-29 19:42:41.448103 (-0200) +1087.742403 +/- 725.183462 pool.ntp.org 126.96.36.199 s2 no-leap
Out of the box, a tracking file is missing. So if you get the error below when checking time:
kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory
create the file and change ownership to
root. Some people reported this was actually breaking the ntp synchronization.
sudo touch /var/db/ntp-kod sudo chown root:wheel /var/db/ntp-kod
Then run again to check if the error message is gone.
sudo sntp -sS pool.ntp.org
In case you have the same issue, i used to use the following commands before, but they hasn’t worked since whatever previous os version/update:
sudo ntpd -sS time.apple.com sudo
ntpdate -u time.apple.com
Have a nice day!