set time to Universal Time

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

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
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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.