A time synchronization error may occur in Windows when your computer fails to automatically synchronize its local time with the time.microsoft.com time servers on the Internet. If your computer’s time is incorrect, you may get an error “
Your clock is ahead” when opening HTTPS sites in Chrome and some other browsers, third-party programs may not work correctly, and other issues.
If you try to manually sync time from the Windows Control Panel (Control Panel -> Date and Time -> Internet Time -> Change Settings -> Update now), you may stumble upon another error:
An error occurred while windows was synchronizing with time.windows.com. The peer is unreachable.
Or this one:
The peer is unresolved.
The first thing you have to do is to check if your computer is configured to automatically synchronize its time with NTP servers on the Internet. Go to Settings -> Time and Language -> Date and Time (or use a URI shortcut command to quickly access the item:
ms-settings:dateandtime ). Make sure the Set time automatically parameter is enabled and click Sync now in the Additional settings to synchronize your time immediately.
If Internet time synchronization fails, run the following command to find out which external NTP server your computer should get the current date/time from:
w32tm /query /peers
By default, workgroup computers (not joined to an Active Directory domain) are configured to get time from time.windows.com servers.
If you receive the error message “
The following error occurred: The service has not been started. (0x80070426)“, check the status of the Windows Time service. It should be configured for either automatic or manual start. You can check the status of the service by using PowerShell or the
Get-Service w32time| Select DisplayName,Status, ServiceName,StartType
Then restart the service:
Restart-Service -Name w32time
If the service is disabled, re-start it.
Make sure that you can access time.microsoft.com from your computer.
First, make sure that your computer can resolve this name to an IP address:
The peer is unresolved“), it means that the DNS server specified in your computer’s network adapter settings is unavailable or isolated from the Internet. Try changing the primary DNS server address to the Google DNS server (
220.127.116.11). In Windows, you can use PowerShell to change the DNS settings for a network adapter.
To get a list of network interfaces, run:
And this is how you can change DNS settings for a network adapter with ifIndex 10:
Set-DNSClientServerAddress –InterfaceIndex 10 –ServerAddresses 18.104.22.168
Check the availability of the time server with ping:
Then check that the Microsoft time server is available on the NTP port (UDP 123). You can use the portquery tool or query the Internet time server directly for a current time using the command:
w32tm /stripchart /computer:time.windows.com
If you get an error: 0x800705B4, it means that the specified NTP server is unavailable. Make sure that the outbound UDP/123 port is open in Windows for the NTP protocol (the port should be open by default). Otherwise, you can use PowerShell to force a port to open in Windows Defender Firewall:
New-NetFirewallRule -DisplayName "AllowOutNTP" -Direction Outbound -Protocol UDP -RemotePort 123 -Action Allow
Enable-NetFirewallRule -DisplayName AllowOutNTP
Also ensure that outgoing NTP traffic is not blocked at the network level (by your ISP, your firewall, or other network devices).
If this NTP server is still unavailable, try a different one.
time.nist.govor the NTP server that is closest to you, which can be obtained from https://www.ntppool.org .
To change the NTP server address, run the command:
w32tm /config /manualpeerlist:time.nist.gov,0x1 /syncfromflags:manual /reliable:yes /update
Now restart the Windows Time service (you will run several commands in one line in this example):
net stop w32time && net start w32time
Then re-synchronize time settings on your computer:
w32tm /config /update
Check that your computer has successfully received the time from the new time source (NTP server):
w32tm /query /status
If all else fails, try completely resetting the Windows Time service settings in Windows:
net stop w32time
net start w32time
Perform time sync:
First, make sure the Synchronize with an Internet time option is enabled. Then add new server time.nist.gov and click Update Now.
You can add an NTP server to this list through the registry
A separate task in the Task Scheduler is used for automatic time synchronization in Windows. Open the
taskschd.msc console and navigate to Task Scheduler (Local) -> Task Scheduler Library -> Microsoft -> Windows -> Time Synchronization. Make sure that the SynchronizeTime task is enabled.
You can also use PowerShell to check the status of a task in Task Scheduler:
Run this command to enable the task: