Lets start of this blog with a very simple (but in my opionion very helpful) post: When dualbooting Windows and Linux, the Windows time are offset by one or a few hours after running Linux. This is an annoying thing, as at least I’ve experience that Windows doesn’t correct this by itself using any time-servers, and a manual click on the Sync time now button is often required.

The reason for the clock skew is because Windows stores the time info in your local timezone, while Linux stores it in UTC. We can of course debate which behaviour is the correct one - but if we ignore the philosophical conundrum for a little while we can focus on getting the OS:s to play nice with each other.

Two options

We have pretty much two different options here: either we configure Linux to use local time instead, or we configure Windows to use UTC.

1. Change Linux to use the local timezone

This modification can of course vary a little depending on which distro you are running, but in general it boils down to this:

timedatectl set-local-rtc 1 --adjust-system-clock

That’s it. The OS will now use the local timezone instead! If you wish to revert and use UTC again, simply call the following:

timedatectl set-local-rtc 0 --adjust-system-clock

2. Tell Windows to use UTC

This one is a little bit trickier, as it involves modifying the registry, but it shouldn’t pose any difficulty.

The key we want to modify is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation and we want to make sure we have a specific DWORD Value in there.

The DWORD (32-bit) Value we are looking for is called RealTimeIsUniversal and it should have a hexadecimal value of 0x00000001 to be enabled. Either update the entry if you already have it, or create a new DWORD Value and you’re good to go.

To revert, simply modify the DWORD value to 0x00000000 or remove it completely.

Enjoy!

A very tiny problem, with an easy fix, but now you can enjoy your dualbooting without having to worry about any clock skew and time differences between your operating systems!