This post briefly outlines how one can force a ntp (Network Time Protocol) sync with the ntp servers defined in the /etc/ntp.conf configuration file. This will not work if there are no ntp servers defined in the /etc/ntp.conf, this can be verified using :
# grep ^server /etc/ntp.conf
This document is useful when the date gets reset e.g. by a hardware maintenance such as a motherboard replacement.
Steps to force NTP sync
1. Stop the ntpd service :
# service ntpd stop
2. Force an update :
# ntpd -gq
-g – requests an update irrespective of the time offset
-q – requests the daemon to quit after updating the date from the ntp server.
3. restart the ntpd service :
# service ntpd start