Fix the Wrong Clock in Windows After Booting Linux (Dual Boot)

Quick fix (recommended): make Windows use UTC

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:

SymptomCause
Windows is off by exactly your UTC offset (for example 1, 2 or 5 hours) after you used LinuxUTC vs local time in the hardware clock (this guide)
Linux is off by the same amount after using Windows, until NTP corrects itSame cause, seen from the other side
Linux shows the wrong hour all the timeWrong time zone in Linux
Both are off by minutes, not hoursTime sync not working in one or both systems
Clock resets to 2000-something after power-offDead 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 RealTimeIsUniversal shows 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.

This tells Windows to treat the RTC as UTC, matching Linux.

  1. In Windows, right-click Start and open Terminal (Admin).
  2. Run:
    reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
  3. Restart Windows. Open Settings → Time & language → Date & time, make sure Set time automatically is on, and click Sync now.
  4. 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.

Undo

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.

Do not apply both fixes

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:

  1. Boot Linux, wait a minute for NTP, and note the time. Run timedatectl and check that System clock synchronized: yes.
  2. Shut down fully (not suspend or hibernate) and boot Windows. The time should be correct immediately, before Windows syncs.
  3. Shut down Windows and boot Linux again. The time should still be correct before systemd-timesyncd or chrony adjusts it; journalctl -b -u systemd-timesyncd or journalctl -b -u chronyd shows 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 UTCFix B: Linux uses local time
Where you change itWindows registrytimedatectl in Linux
Daylight saving changesNo RTC adjustment neededRTC must be adjusted; can be off by an hour until a sync
Multiple Linux installsNothing to change in any of themMust be applied in every Linux install
Supported byWindows (long-standing registry option)systemd, with a warning
Best forYour own machineManaged 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 TZ before 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: chronyd handles NTP; timedatectl set-local-rtc works the same. chrony's rtcsync directive (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/adjtime reads UTC or LOCAL; timedatectl updates 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 /resync in an admin terminal; if the service is stopped, start it with net 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.