3

This question already has an answer here:

When I boot into Windows 7, the time maybe for example set to 3:04 pm. The real time being 11:04 am. Then I reboot and go into Ubuntu and the time is set to 7:04 am. With the same date in both. I go into BIOS and Windows syncs it with the time it believes it is so it'll be set to 3:04 pm. I've tried changing them all to the right time. Turning off online sync with both. And disabling UTC in ubuntu with command
$sudo hwclock --localtime
nothing has worked.

marked as duplicate by Eric Carvalho, Arronical, Anwar, edwinksl, Elder Geek Oct 12 '16 at 17:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

8

As the amount of minutes is always set correctly, it is probably not battery, but the timezone issue. Windows tries to keep HW clock at the local time. Linux tries to keep them at the UTC.

Your experiment with hwclock --localtime was almost right, but hwclock changes it only for the current boot. You want to save this information permanently.

Set UTC=no in /etc/default/rcS to keep it persistent over the time.

see https://help.ubuntu.com/community/UbuntuTime#Make_Linux_use_.27Local.27_time for more details

After this configured properly, you should again enable automatic sync in both Linux and Windows.

  • okay great! I guess that fixes the ubuntu portion of the problem anyway – Daniel Sep 7 '14 at 15:43
  • 2
    That should fix both sides of the problem. What you need to make sure, that all system you are using are using same setting. Either local time or UTC time. Windows by default uses local time. So if you tweak Ubuntu to local, both systems are in sync and problem should be gone. – Radek Dostal Sep 7 '14 at 15:45
  • 1
    As from Ubuntu 16.04+ this should be timedatectl set-local-rtc 1 – Teifun2 Oct 3 '18 at 20:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.