Windows clock always wrong and nothing fixes it? The fix almost nobody mentions
My PC hasn't shown the correct time a single day since I bought it. It was always a few minutes off: I'd set it manually and a few days later it was wrong again. I tried everything you find online: changing the time zone, turning automatic time off and on, the "Sync now" button, switching servers… Nothing.
The problem was a hidden setting in the Windows registry that none of those steps touch. Here's how to spot it and fix it.
Symptoms
- The clock runs fast or slow by a few minutes and keeps doing it even after you set it right.
- In Settings → Time & language → Date & time, under "Sync now", it says "Last successful time synchronization: Unspecified", or the button never finishes syncing.
- In Control Panel (Date and Time → Internet Time) you get "An error occurred while Windows was synchronizing", no matter which server you try.
The cause
Windows stores which server to use for time sync in two places:
- The normal settings, the ones you change through the Windows menus.
- A group policy, which takes priority over the normal settings.
If there's a policy with an empty or mistyped server, Windows follows it and ignores everything you change in the menus. It can be there from day one, depending on how the PC was set up or because of some installed program, or it can show up later from a command copied off the internet or an "optimizer" tool. In my case the server was literally ,0x1, meaning no server at all.
How to check if this is your problem (30 seconds)
- Press the Windows key, type cmd, right-click Command Prompt and choose Run as administrator.
- Paste this command and press Enter:
reg query "HKLM\SOFTWARE\Policies\Microsoft\W32Time\Parameters"
- If you see an NtpServer value with something odd (empty, ,0x1, stray quotes…), that's your problem. If it says it can't find the key, the problem is something else: see "Other suspects" at the end.
The fix
In the same admin Command Prompt, paste these lines one at a time:
reg delete "HKLM\SOFTWARE\Policies\Microsoft\W32Time\Parameters" /v NtpServer /f
reg delete "HKLM\SOFTWARE\Policies\Microsoft\W32Time\Parameters" /v Type /f
w32tm /config /manualpeerlist:time.windows.com,0x9 /syncfromflags:manual /update
net stop w32time
net start w32time
w32tm /resync
The first two remove the bad policy. The third sets Microsoft's time server properly. The last three restart the time service and sync it.
To finish, go to Settings → Time & language → Date & time and turn on "Set time automatically".
If you'd rather not use commands: open Registry Editor (regedit) and go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\W32Time\Parameters. On the right, right-click → Delete on NtpServer and on Type. Then restart your PC and click "Sync now".
How to check it worked
Under "Sync now" you should see "Last successful time synchronization:" with today's date and time. You can also type this in cmd:
w32tm /query /source
It should return time.windows.com,0x9. If it says Local CMOS Clock or Free-running System Clock, it's still not syncing.
Two tips
- Use Command Prompt (cmd), not PowerShell, for the w32tm /config command. In PowerShell, quotes sometimes end up inside the server name and break it. On my PC the server was saved as "pool.ntp.org with an extra quote, probably for that reason.
- If it's a work computer joined to a company domain, that policy may be there on purpose. Don't touch it and talk to your IT department.
Other suspects, if it's not the policy
- Off by exactly 1 or 2 hours: wrong time zone, or you have Linux installed on the same PC (dual boot).
- Time resets every time you shut down: the motherboard battery (CR2032) is dead.
- You use a VPN, an antivirus with a firewall, or a company network: they can block the port time sync uses (UDP 123).
Hope this saves you the hours I spent on it! 🙌