More Menu
Reading ListGanti TemaSearch
Reading List

Queue · 0 items

Your reading list is empty. Save articles to read them later.

Start Reading

Fix Dual-Boot Clock Mismatch Between Windows and Ubuntu

Iwan Efendi2 min

Fix the clock jumping hours when switching between Windows and Ubuntu by making both OS read hardware RTC as UTC.

If you dual-boot Windows and Ubuntu, you've almost certainly seen this: the clock in Windows suddenly jumps several hours forward or backward right after booting from Ubuntu. It's not a bug — it's a fundamental disagreement between the two operating systems about how to read time from your motherboard. I spent an embarrassing amount of time thinking my BIOS battery was dying before I realized the actual cause.

The Root Cause

The problem comes down to how each OS interprets the RTC (Real-Time Clock) — the hardware clock on your motherboard.
  • Windows reads RTC as local time (e.g. UTC+7 for WIB)
  • Ubuntu/Linux reads RTC as UTC, then converts to local time in software
When you boot into Windows after using Ubuntu, Windows reads the UTC-set hardware clock and treats it as local time. If you're in UTC+7, the clock shows 7 hours behind. The fix: make both OS agree to read RTC as UTC.

Fix: Windows Side (Registry)

Open PowerShell as Administrator (Win + X → Terminal (Admin)):
1

Add the RealTimeIsUniversal registry key

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /t REG_DWORD /d 1 /f
2

Verify the registry entry

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal
You should see 0x1 in the output. That confirms Windows will now treat the hardware clock as UTC.
3

Force NTP time sync

net start "Windows Time"
w32tm /config /manualpeerlist:"time.windows.com" /syncfromflags:manual /reliable:YES /update
w32tm /resync /force
If w32tm /resync fails with "no time data was available", make sure the /config command ran first — the order matters.
4

Restart Windows

A reboot is required for the registry change to take full effect.

Fix: Ubuntu Side (NTP)

Boot into Ubuntu and enable NTP sync:
sudo timedatectl set-ntp true
Verify with:
timedatectl status
The output you're looking for:
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
The critical line is RTC in local TZ: no — that confirms Ubuntu is reading the hardware clock as UTC, which is the correct default.

Order Doesn't Matter

You can set up either OS first. The fixes are independent of each other. What matters is that both are configured — if you only fix one side, the clock drift will come back every time you switch.

Quick Reference

OSAction
WindowsAdd RealTimeIsUniversal=1 registry key + NTP sync
UbuntuEnable NTP + confirm RTC in local TZ: no

After both sides are set, the clock stays consistent no matter how often you switch between operating systems. No more manual time corrections. If you're setting up a dual-boot with a fresh Windows install, it's worth doing this right from the start — it's a two-minute fix that saves a lot of minor annoyance.

References

  1. Time — ArchWiki
  2. timedatectl — Ubuntu Manpage
Topics

Topics in this note

Explore related ideas through the topics connected to this note.

Share this article

Discussion

Preparing the comments area...

You Might Also Like