Ubuntu – Unable to synchronize the clocks on a dual boot system

arch linuxclockdual-bootUbuntu

A have a dual boot system: Ubuntu and Arch. Ubuntu was installed first. A while after installing Arch, I've set up its clock because it was 8 behind my current time zone (my time zone is gmt +8). I don't remember the actual command, something like date --set "xxxxxx". However, I do remember that I specified the time zone during its installation (gmt +8, Hong Kong). And when I checked sysclock and it showed the real time in my time zone.

In Ubuntu the time zone remained the same – gmt +8. That being said, after setting up the clock in Arch I found out that the clock in Ubunutu was 8 hours behind the actual time. But! The time zone was still the same – gmt +8. So now in both systems the time zone is the same (Hong Kong) but the time is different in 8 hours. What's more that the clock in Ubuntu was changed by itself when I changed the clock in Arch.

What do I do about that?

sudo hwclock --show shows the same time on both systems.

Best Answer

It sound slike one of your systems is configured to treat the hardware clock as localtime, while the other one treats it as UTC. Ubuntu docs leave me to believe Ubuntu is UTC by default, so probably your Arch isn't. You can check and set this by checking if

timedatectl status | grep local

returns anything, and set Arch to use UTC by saying

timedatectl set-local-rtc false

(Disclaimer: I run neither Arch nor Ubuntu and just googled tutorials for this.)

Related Question