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.
Asked
Active
Viewed 2.3k times
3

Daniel
- 372
- 2
- 9
- 26
1 Answers
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.

Radek Dostal
- 3,096
timedatectl set-local-rtc 1
– Teifun2 Oct 03 '18 at 20:49