Fix Linux Windows Dual Boot Clock Error
In this article
Yes, the clock error in a Linux/Windows dual boot is caused by the two operating systems storing the hardware clock differently: Windows uses local time, while Linux uses UTC by default. The fix is to make both systems agree on one standard. The easiest and most reliable method is to tell Linux to treat the hardware clock as local time, matching Windows. This guide shows you exactly how to do that, plus the alternative of switching Windows to UTC if you prefer.
What You'll Need
- Access to your Linux system (any distribution with systemd, which is most modern ones).
- Administrative (sudo) privileges on Linux.
- Access to Windows (for the alternative method).
Step-by-Step
Method 1: Make Linux Use Local Time (Recommended)
- Boot into Linux.
- Open a terminal window.
- Run the following command to set the hardware clock to local time:
timedatectl set-local-rtc 1 - Verify the change by running
timedatectl. Look for the line that saysRTC in local TZ: yes. If it saysno, the command didn't take effect. - Reboot into Windows. The time should now be correct, and it will stay correct after reboots.
Method 2: Make Windows Use UTC (Alternative)
- Boot into Windows.
- Open Command Prompt as Administrator (search for "cmd", right-click, and choose "Run as administrator").
- Run the following command to enable UTC:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f - Reboot into Linux. The time should now be correct.
Note: Menu and setting labels can differ slightly by Linux distribution and version, but the timedatectl command works on all systemd-based distributions (Ubuntu, Fedora, Debian, Arch, etc.).
Common Mistakes
- Forgetting to reboot: The change only takes effect after a full reboot. A simple logout may not apply it.
- Using the wrong command: Some older guides suggest editing
/etc/adjtimemanually. While that works, it's easier to usetimedatectl. - Applying the Windows registry fix on 32-bit Windows: The registry path is the same, but ensure you're using an administrative command prompt.
- Not checking the RTC setting after the command: Always verify with
timedatectlto confirm the change stuck.
Tips
- If you use multiple Linux distributions, applying the local-time setting on each one is a good idea, or they may conflict with each other.
- If you ever change your system time zone, the hardware clock will still be correct; the OS will handle the conversion automatically.
- If you have a dual boot with more than two OSes, make sure all of them use the same clock standard.
Troubleshooting
If the time is still wrong after following the steps:
- Check that the command executed correctly: Run
timedatectland confirm the RTC setting. If it showsRTC in local TZ: no, try running the command again withsudo. - Check if your Linux distribution uses a different init system: Very old distributions might not have
timedatectl. In that case, edit/etc/adjtimeand change the last line fromUTCtoLOCAL, then reboot. - If Windows time is still wrong after the registry fix: Make sure you ran the command as administrator. Also, some Windows updates may reset this registry key; you may need to reapply it after major updates.
- If the time is off by exactly one hour: This is usually a timezone issue, not a UTC/local issue. Check your timezone settings in both OSes.
Frequently Asked Questions
Why does the clock error happen in the first place?
Windows assumes the hardware clock stores local time, while Linux assumes it stores UTC. When each OS reads the clock, it interprets it differently and then applies the timezone offset, causing a mismatch.
Which method is safer?
Making Linux use local time is generally safer because it doesn't involve modifying Windows registry entries. It's also the officially recommended approach by most Linux distributions.
Will this fix affect my system's performance?
No, it only changes how the system interprets the hardware clock. There is no performance impact.
Do I need to redo this after a Windows update?
Windows updates can occasionally reset the registry key if you used the Windows UTC method. The Linux local-time method is persistent and usually survives updates.
What if I have more than two operating systems?
Make sure all operating systems use the same clock standard. For example, if you have two Linux distributions and Windows, set both Linux distros to local time, or set Windows to UTC and keep Linux on UTC.
Can I fix this without using the command line?
Some Linux distributions offer a graphical tool for this, but the command-line method is universal and quickest. If you're uncomfortable with the terminal, you can edit the /etc/adjtime file with a text editor, but it's essentially the same thing.