Reputation: 2456
In my Linux Ubuntu 14.04 LTS machine date is shown incorrectly. When I try to run hwclock and date commands from the terminal they display different results:
sudo hwclock Thursday 14 August 2014 04:38:09 PM IST -0.766043 seconds date Thu Aug 14 11:08:30 IST 2014
Here hwclock time is right, but date is wrong. How can I correct it.
Thanks
Upvotes: 9
Views: 7519
Reputation: 75498
Looks like your hardware clock is set to local time. Run this:
hwclock --localtime --hctosys
See hwclock --help
for more info.
You should configure your boot-time settings so that this would be the default action when restoring your system time from the hardware clock. Check the documentation of your distro.
Upvotes: 12