Fix clock skew when dual boot Windows (7/8) and Linux

When you have a computer which runs both Linux and Windows OSs at the same time, a common issue you may face is one where each OS clock is showing you a different hour than the other.

Updated Sep 19, 2016How To's
clocks

Now, one may think that simply right-clicking on the appropriate place on the screen and adjusting the date and time might solve this issue, right? Unfortunately, in reality case, one would be usually wrong to think that.

Why? simply because the problem doesn’t come from an uncalibrated clock, but originates from a different approach to calculating the time, namely, Linux uses UTC compared to Windows’s local-time.

What to do?

In order to fix just that, there are basically 2 ways you can go about, either practice some command-line on your Linux OS or create a registry fix on Windows. As simple as that, it’s your call and here’s how you do it:

  • Creating a registry fix (Windows)

Use Windows built-in search and look for the word regedit, found it? great, open it up and navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTimeZoneInformation  right click on an empty space inside there and choose DWORD (32bit) even if your machine is 64-bit, name the  entry you just created RealTimeIsUniversal and assign the value 1 to it.

Reboot.

Regedit-RealTimeIsUniversal

  • Practice the command-line (Linux)

Open up your Terminal and type (assuming your distro utilizes systemd)

timedatectl status | grep local

check local time

This will show you whether your distro uses local-time or UTC when it reads the hardware clock. In order to set the hardware clock time standard to localtime, use:

timedatectl set-local-rtc true

In order to revert, just replace the word true with false at the end of the line.

Note that if the hardware clock is set to localtime, dealing with daylight saving time can be messy. Hence you might be better with creating a registry key.

COMMENTS (beta 4)

?
Add your comment here...

More In Linux