In Ubuntu there’s a command to correct time zone and geographic area time setting in terminal.
#sudo dpkg-reconfigure tzdate
and follow the instruction
But if we want only to correct the date to the right one, there is an ubuntu server that can help us. NTP is network time protocol.
#sudo ntpdate ntp.ubuntu.com
To make sure the date/ time is correct everyday, put it in the cron job.
1. Create a file let say ntpdate in /etc/cron.daily
2. inside the file type this
sudo ntpdate ntp.ubuntu.com
3. Make sure that you make this new file executable:
#sudo chmod 755 /etc/cron.daily/ntpdate
So the time in our computer will be okay.