← All posts
April 9, 20241 min read
Windows Time Server Fix
Changing which NTP server Windows syncs its clock against via the registry.
#windows#networking
Change the time server on Windows
- Open Run (
Win+R), typeregedit, and hit Enter. - Navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers. - Add a new string value — the name is an integer (
1,2,3, …) and the value is the time server's address. Popular choices:us.pool.ntp.orgtime.google.com,time1.google.com…time4.google.comtime-a-g.nist.gov
- The
(Default)entry's value is the integer key of whichever server should actually be used — e.g. iftime.google.comis registered under3, set(Default)to3.
That registry key only feeds the Date & Time control-panel dropdown. The actual Windows Time service reads W32Time settings under HKLM\SYSTEM\CurrentControlSet\Services\W32Time, so to change what the service itself syncs from you need w32tm below.
Actually forcing the sync
Diagnose first:
w32tm /query /status
w32tm /query /peers
w32tm /resyncPoint the service at a specific server:
w32tm /config /manualpeerlist:"time.google.com,0x8" /syncfromflags:manual /update
net stop w32time && net start w32time
w32tm /resyncNTP runs over UDP 123 — if a firewall blocks it, w32tm /resync fails with "no time data was available".
Reference