[Fixed] Time Mismatch in Your Dual Boot: A Windows & Linux Guide

Not every task can be performed on the Linux desktop without going through the hassle, and even after a lot of tinkering, some of the things just do not work. Certain programs are simply not available on Linux, such as the Adobe creative suite or games which use kernel-level anti-cheat to name a few. So, it is understandable that you may have installed Windows side-by-side to your Linux distribution in order to go about your daily life.

However, installing Windows either on the Same hard drive or a different hard drive side-by-side to your Linux installation comes with several annoying things as well. With every Windows update, there is a chance that Windows will screw up with the GRUB bootloader if both of your OS are on the same Partition.

You may have also noticed that whenever you boot into Windows after using Linux, the clock on the taskbar displays an incorrect time, despite being in the correct time zone and network time has been set up. We will try to address this issue in this article and also try to understand why this happens in the first place.

Resolving the time mismatch issue when dual booting Linux and Windows involves adjusting the hardware clock settings. You can either make Linux recognize the hardware clock in local time or instruct Windows to acknowledge the hardware clock in UTC time

Understanding the Time Difference between Two Operating Systems

Your computer measures time with two clocks. One is the system clock and the other one is your Hardware clock.

Your Hardware clock always keeps ticking even when the system is turned off. It is also referred to as BIOS/CMOS clock and it runs outside of your Operating system within the motherboard.

Your system clock is measured by your operating system, and here is where the main difference arises between Windows and Linux. Linux operating systems measure time in the UTC and try to read the Hardware clock in UTC, whereas Windows on the other hand tries to read the Hardware clock in your local time (that is, IST, PT etc.).

Whenever you boot into Linux, the OS sync its time with the hardware clock and if there is any disagreement between System and the hardware clock, the system clock’s time is assumed to be correct.

So, Linux sets the System clock to UTC and manually adds/removes the extra time according to your Timezone. Now when you reboot into Windows, it tries to read the Hardware clock and assumes that the Hardware clock is set to your Local time and displays it ‘as is’ therefore resulting in an error.

Methods to Resolve the Time Mismatch Issue

Now, the easiest method would be to set up network time on both operating systems so that both of them set the correct time whenever you connect to the Internet. But sometimes this trick does not work so your other options would be to either tell Linux to recognize the hardware clock to be in local time or tell Windows to recognize the Hardware clock being in the UTC time.

So let’s see how can we apply both of these fixes to Windows and Linux operating systems using single commands on both operating systems (Note that you will only have to apply only one of these mentioned fixes to either Linux or Windows).

Correcting the Time Mismatch on Linux

Open your Terminal window and type the following commands in the Linux terminal:

timedatectl
The Default Time In Linux Systems Is Set To UTC
The Default Time In Linux Systems Is Set To UTC

As you can see, RTC time is set to UTC. If we want to set RTC time to local timezone, then we can type:

timedatectl set-local-rtc 1
Changing Hardware Clock To Use Local Time
Changing Hardware Clock To Use Local Time

You will see this warning about the changes that you have made. The next time you reboot, the problem will be solved for you on both Linux and Windows.

Addressing the Time Mismatch on Windows

It is a little bit complicated to do the same thing on Windows as you will have to deal with the registery editor. Press the Windows Key + R and type regedit in the Run menu and launch the application.

Open Regedit From The Run Menu
Open Regedit From The Run Menu

Now, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal path and add a QWORD value named RealTimeisUniversal with hexadecimal value 1. If you are using a 32-bit Windows OS, then create a DWord value instead.

Set The Regex Value As Per Your Needs
Set The Regex Value As Per Your Needs

From the Windows Date & Time settings, you should also disable the ‘Network time’ option so that Windows does not try to alter the time using the Internet. Once you are done, simply reboot and see if the changes have taken effect.

Conclusion: Understanding and Managing Time Differences

Through this guide, we explored how Linux and Windows interpret the hardware clock differently. Remember, Linux’s unique approach isn’t a bug but a feature. What other ‘different’ things about Linux have you noticed?

Also Read