Fix the Wrong Clock in Windows After Booting Linux (Dual Boot)
Boot Windows, open Terminal (Admin) or an administrator Command Prompt, and run:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
Restart Windows and let it sync the time (Settings → Time & language → Date & time → Sync now). Both systems now agree.
Prefer to change Linux instead? Run timedatectl set-local-rtc 1 --adjust-system-clock; see below for the trade-offs.
Identify your case
Match the symptom before changing settings, because a wrong time zone or a dead CMOS battery looks similar:
| Symptom | Cause |
|---|---|
| Windows is off by exactly your UTC offset (for example 1, 2 or 5 hours) after you used Linux | UTC vs local time in the hardware clock (this guide) |
| Linux is off by the same amount after using Windows, until NTP corrects it | Same cause, seen from the other side |
| Linux shows the wrong hour all the time | Wrong time zone in Linux |
| Both are off by minutes, not hours | Time sync not working in one or both systems |
| Clock resets to 2000-something after power-off | Dead CMOS battery on the motherboard |
Why it happens
Every PC has a battery-backed real-time clock (RTC) that keeps time while the computer is off. It does not store a time zone, only a date and time. Linux, macOS and most Unix systems treat that value as UTC and apply your time zone in software. Windows by default treats it as local time. Each OS, when it syncs with an internet time server, writes its own interpretation back to the RTC, so the other one starts with the wrong hour.
Diagnose step by step
Step 1: Check the current setting in Linux
timedatectl
Example output:
Local time: Fri 2026-10-16 14:05:12 CEST
Universal time: Fri 2026-10-16 12:05:12 UTC
RTC time: Fri 2026-10-16 12:05:11
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
- RTC time equal to Universal time and
RTC in local TZ: no: Linux uses UTC, which is the default. Fix Windows. - Time zone wrong: fix that first (Step 2), it is not a dual-boot problem.
- System clock synchronized: no: enable time sync (Step 3).
You can read the hardware clock directly with sudo hwclock --show.
Step 2: Make sure the Linux time zone is right
timedatectl list-timezones | grep -i berlin
sudo timedatectl set-timezone Europe/Berlin
Use your own region. The time zone lives in /etc/localtime; changing it does not touch the hardware clock.
Step 3: Make sure time sync works
sudo timedatectl set-ntp true
timedatectl timesync-status
Ubuntu, Debian and Arch use systemd-timesyncd; Fedora and openSUSE use chronyd (check with chronyc tracking). If timesync-status reports that the service is not running, your distro uses chrony instead, which is fine. Basics of managing these services are in systemd basics.
Step 4: Check the Windows side
Before changing the registry, make sure Windows itself is configured correctly; otherwise the fix appears not to work.
- Time zone: Settings → Time & language → Date & time. Turn on Set time zone automatically or pick the same zone you use in Linux.
- Automatic time: Set time automatically should be on so Windows corrects itself from the internet.
- Current state: in an admin terminal,
reg query "HKLM\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversalshows whether the value already exists. "Unable to find the specified registry key or value" means Windows is still on local time.
If Windows is offline most of the time (no NTP), it relies only on the RTC, so getting the RTC interpretation right matters even more.
Fix A: make Windows store UTC (recommended)
This tells Windows to treat the RTC as UTC, matching Linux.
- In Windows, right-click Start and open Terminal (Admin).
- Run:
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f - Restart Windows. Open Settings → Time & language → Date & time, make sure Set time automatically is on, and click Sync now.
- Boot Linux, then Windows again, and confirm the times match.
Why this is preferred: UTC never jumps for daylight saving time, so neither OS has to adjust the RTC twice a year. The value is REG_DWORD 1; some older guides use REG_QWORD, which also works on 64-bit Windows.
To return Windows to local time: reg delete "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /f, then restart and sync.
Fix B: make Linux store local time
Use this if you cannot change Windows (a managed work laptop, for example).
timedatectl set-local-rtc 1 --adjust-system-clock
timedatectl
--adjust-system-clock keeps the current system time and rewrites the RTC in local time. timedatectl will then print a warning:
Warning: The system is configured to read the RTC time in the local time zone.
This mode cannot be fully supported. It will create various problems
with time zone changes and daylight saving time adjustments.
In practice it works as long as one of the systems is online and syncs after a DST change. To revert later: timedatectl set-local-rtc 0 --adjust-system-clock.
Use Fix A or Fix B. If Windows is set to UTC and Linux to local time, the problem simply reverses.
Verify the fix
After applying one fix, run a full round trip so you know it holds:
- Boot Linux, wait a minute for NTP, and note the time. Run
timedatectland check thatSystem clock synchronized: yes. - Shut down fully (not suspend or hibernate) and boot Windows. The time should be correct immediately, before Windows syncs.
- Shut down Windows and boot Linux again. The time should still be correct before
systemd-timesyncdor chrony adjusts it;journalctl -b -u systemd-timesyncdorjournalctl -b -u chronydshows how big the correction was. A correction of seconds is normal; hours means the setting did not take.
You can also look at the clock in the firmware setup (BIOS/UEFI). With Fix A, it should show UTC; with Fix B, your local time.
Comparing the two fixes
| Fix A: Windows uses UTC | Fix B: Linux uses local time | |
|---|---|---|
| Where you change it | Windows registry | timedatectl in Linux |
| Daylight saving changes | No RTC adjustment needed | RTC must be adjusted; can be off by an hour until a sync |
| Multiple Linux installs | Nothing to change in any of them | Must be applied in every Linux install |
| Supported by | Windows (long-standing registry option) | systemd, with a warning |
| Best for | Your own machine | Managed Windows you cannot change |
If you dual boot several Linux distributions and no Windows, they all use UTC by default and there is nothing to fix. Virtual machines are not affected either; they get their clock from the host.
Distro notes
- Ubuntu and Linux Mint: the RTC is kept in UTC by default, but an earlier tweak or an old guide may have switched it. Check
RTC in local TZbefore applying either fix. Mint's Date & Time settings show the same information. - Debian: the installer asks whether the hardware clock is set to UTC; answering "No" selects local time.
- Fedora and openSUSE:
chronydhandles NTP;timedatectl set-local-rtcworks the same. chrony'srtcsyncdirective (enabled by default on Fedora) lets the kernel copy system time to the RTC periodically. - Arch Linux: the install guide runs
hwclock --systohc, which writes UTC and creates/etc/adjtime. The third line of/etc/adjtimereadsUTCorLOCAL;timedatectlupdates it for you.
Last resort
- Clock resets on every power-off: replace the CMOS coin cell (usually a CR2032) on the motherboard. Until then, both systems will start with a wrong date and rely on NTP; TLS errors and failed updates right after boot are a typical sign.
- Windows refuses to sync: run
w32tm /resyncin an admin terminal; if the service is stopped, start it withnet start w32time. - Time still jumps: disable Windows Fast Startup (Control Panel → Power Options → Choose what the power buttons do). With Fast Startup, Windows does not really shut down and can write stale values; it also locks NTFS partitions you might share with Linux.
Planning to stop dual booting altogether? See removing Ubuntu from a Windows dual boot. If the GRUB menu disappeared after a Windows update, fix GRUB from a live USB.
Frequently asked questions
Why does dual booting Linux change the Windows clock?
The PC has one hardware clock (RTC). Linux stores UTC in it, Windows assumes it holds local time. When Linux syncs the clock and writes UTC, Windows reads that as local time and shows it shifted by your UTC offset.
Which fix is better: change Windows or change Linux?
Changing Windows to UTC with RealTimeIsUniversal is cleaner, because UTC does not jump at daylight-saving changes. Setting Linux to local time works too, but systemd warns about it and DST changes can cause a one-hour error if neither OS is running at the switch.
Does this also happen with macOS?
macOS stores UTC like Linux, so a Mac dual-booting Linux has no conflict. Only Windows defaults to local time.
The time is wrong in Linux too, not just Windows. Why?
Check the time zone and NTP with timedatectl. If the clock resets to an old date after every power-off, the motherboard's CMOS battery is likely dead.
Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.