Solved: Windows Time Wrong After Linux Dual Boot

If you use Windows and Linux System in dual boot, you may have noticed that Windows time is wrong after booting to Linux.

This issue arises because Windows and Linux have different assumptions about hardware clocks when setting up time. Windows assumes Hardware Clock is set to the local time, whereas Linux assumes Hardware Clock is set to UTC (Coordinated Universal Time). We can quickly fix this issue by changing hardware clock assumption in any operating system.

In this blog post, I will discuss two easy solutions to fix inconsistence time between Windows and Linux Operating systems.

Why Windows Time is Wrong After dual Booting with Linux

Windows and Linux use two different approaches to keep track of time. Linux assumes that your computer hardware clock is set to UTC (Coordinated Universal Time) and adjusts time by adding an offset to UTC. Windows assumes the hardware clock is set to Local and doesn’t adjust time by adding an offset. This different assumption of the hardware clock leads to a different time in two operating systems.

Suppose you live in New York, where time zone offset is EST(UTC-05:000). You boot into Linux and set your time to 12:00 PM. While Linux assumes the hardware clock is set to UTC, setting your time to 12:00 PM changes the system time to 5:00 PM by adding the EST offset to match the time in New York.

Then when you boot into Windows system, windows assume hardware clock 5:00 PM is local time hence displays 5:00 PM instead of 12:00 PM. As a result, displayed time in Windows is 5 hours ahead of the actual time in New York.

This time incorrect time causes confusion and wrong timestamps in files, logs, emails and many more.

Solution 1: Fix Wrong Time in Windows

One solution is configuring Windows to use UTC (Coordinated Universal Time) instead of Local Time. To confiugure UTC in Windows open command promt with administrative privillage.

command promt with administrative privillage

Enter the following command to the command prompt.

REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1 /f

This command adds a Registry value to use the UTC hardware clock.

Setting UTC in command prompt

Now, both Windows and Linux systems use UTC as hardware clock, so there will be no inconsistency in time between Windows and Linux.

Solution 2: Fix Wrong Time in Linux

Another solution is configuring Linux to use local time as hardware instead of UTC. In this case, the Linux system will not adjust hardware clock, so there will be no difference in time between Windows and Linux. To configure local time Linux, Open the terminal and enter the following command

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

By changing the “UTC” value to “RTC”, you are telling Linux to use the local time for the hardware clock instead of UTC. This will resolve the incorrect time issue.

Conclusion

You can use any of these methods to fix this issue. There is no advantage to using one way over another. But configuring the local clocks in Linux is more straightforward than setting UTC hardware in Windows.

Share your love

Newsletter Updates

Stay updated with our latest guides and tutorials about Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *