We will use the NTP daemon to update or sync the time of our CentOS server (or other Linux server).
Make sure it is installed:
yum install ntp
Then, start the daemon:
chkconfig ntpd on
Now let’s update the time and date:
ntpdate pool.ntp.org
If you get the error Can’t adjust the time of day: Operation not permitted, you probably use a VPS.