At times, we might need to change the system time for working on some developmental and testing activities. Setting a new time is always easier, and pretty straight forward in many operating systems.
Have you ever wondered how to reset / resync the correct timestamp.
Yes, I thought so. We will try setting it back again to the correct time, instead of re-synching with the time server. Resetting the time using a time server is pretty easy, and you can do that just in a couple of steps, stated below.
- First set the date to a different date with this command
date -s "10 Sep 2013 15:59:59.000-UTC-0700"
- To sync the time back to correct time stop the
ntp
service by executing this command
$ sudo service ntp stop
-
Now map the time server like thisl
ntpdate -b pool.ntp.org
(you can use any other time server) -
Start the ntp service back again
sudo service ntp start
-
Click the date from the
taskbar
. -
Now click
Change Date & Time Settings
-
Under
Date and Time
tab you can change the current system time using theChange date and time
option -
When you want to resync, navigate to the
Internet Time
and click onChange settings...
button. -
In the opened pop up window, select the server you want to use for synchronization and click
Update now
button. -
This will show the running status of the synchronization. Once the date and time are synchronized you can click on
ok
and close the window.
Hope this helps - Sharath