Last Updated: February 25, 2016
·
794
· radius314

Resync time for CentOS

Sometimes when your machine is asleep a VM may not resync it's time with the NTP server. Here is a simple little script to reset it.

This can be especially important when time synchronization is key.

#re-sync time for a CentOS VM which was  sleeping

/etc/init.d/ntpd stop
ntpdate pool.ntp.org
/etc/init.d/ntpd start

date

Original Gist: https://gist.github.com/radius314/6156581