NTP is the Network Time Protocol. It is a standard way to keep system clocks synced. This post will go through the easy steps of getting you linux box configured to always follow the correct time based on NTP servers.
First you will need to install ntp
sudo apt-get update sudo apt-get install ntp
Always make a backup of config files
sudo mv /etc/ntp.conf /etc/ntp.conf-bak sudo nano /etc/ntp.conf
Now you just need to set the servers you want to sync with
# ntpd.conf tinker panic 0 restrict 127.0.0.1 restrict default kod nomodify notrap server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org
Restart and update
sudo /etc/init.d/ntp stop sudo ntpdate pool.ntp.org sudo /etc/init.d/ntp start ntpq -pn
And you done!, the last command will show how much in sync you are with the listed ntp servers.