If your system dual boots both Windows and Linux, you might notice that it’s impossible to get the system clocks to sync. No matter how you change the clock in one OS, it doesn’t fix the problem with the other OS. This is because of a disagreement about time-keeping methodology between Windows and Unix-based operating systems. Fortunately, there’s a relatively easy fix for that.
Why does this happen?
Your computer stores the current time in a clock on your motherboard. This allows the computer to keep track of time even when turned off. To account for time zones, different operating systems use different methods. Windows assumes the local time is stored in the motherboard, so it doesn’t apply any kind of time zone offset. Linux, on the other hand, will interpret the time on the motherboard as UTC (a.k.a. Greenwich Mean Time) and apply a timezone offset to display local time.
Both of these systems work perfectly fine independently. The problem occurs when you dual boot a system, running Windows and Linux off the same motherboard. When the operating systems are forced to share a time store, the clocks won’t sync.
There are two different ways we can fix this problem: we can change how Linux interprets the stored time or do the same to Windows.
Option 1: Make Linux use local time
The most reliable way to make Linux and Windows agree on the time is to change Linux’s time keeping methodology. While this isn’t explicitly supported, it’s slightly more reliable than doing the same in Windows. It works on any flavor of Linux using
systemd, which includes Ubuntu, Fedora, Red Hat, Debian, and Mint. Changing the Windows time typically works fine too, but it can sometimes lead to instabilities in third-party software that expects the stored time to be local time.
1. Open Terminal and run the following command:
timedatectl set-local-rtc 1 --adjust-system-clock
This will tell the system to interpret your motherboard’s stored time as local time. Linux will no longer apply time zone adjustments to the time stored on the motherboard. As a result, your clocks will sync.
If you ever need to reverse the command, change the 1 to a 0:
timedatectl set-local-rtc 0 --adjust-system-clock
Option 2: Make Windows use UTC
You can also change the way that Windows views system time. This tweak will cause Windows to interpret the time stored on the motherboard as UTC, which Linux can then interpret as the correct time zone. While this generally works well, some applications rely on motherboard time being local time. As a result, hard-to-track bugs can sometimes appear. That makes this option slightly less desirable than the first.
1. Disable “Set time automatically” under “Time & Language” in the Settings application. This will prevent Windows from reverting the changes we’re about to make.
2. Open Registry Editor by typing
regedit in the Start Menu.
3. Find the following registry key in the left pane of the registry editor. To get there quickly, paste the location into the registry editor’s address bar:
4. Right-click on the “TimeZoneInformation” key in the left pane and chose “New -> DWORD (32-bit) Value” from the context menu.
5. Name your new value “RealTimeIsUniversal.”
6. Double-click on the value you just created, set its value to “1,” and click “OK.”
The safest way to sync your system clocks on a dual-booting system is to adjust how Linux interprets time. If that doesn’t work for you (or if you’re using macOS instead of Linux), you can also edit the Windows registry to change the way Windows understands motherboard time.