Fix Windows Time Sync Problems Using w32tm Commands
The clock shows the wrong time, websites complain about certificates, and OTP apps stop working. A wrong clock breaks far more than the clock — here is how to diagnose and force a proper sync.
✍️ Technical Anshu🪟 Windows 10 / 11⏱️ 5 minute fix
🎥 This command is part of the 60 Windows Commands video — watch the full toolkit in action
Windows syncs its clock through the Windows Time service using a tool called w32tm. When sync fails, the signs are odd: secure websites refuse to open, banking and OTP apps reject codes, and file timestamps go strange — all because your clock disagrees with the world. This guide checks what the service thinks is happening, restarts it properly, and forces a resync. The last step covers the one hardware cause no command can cure.
👆 A healthy status: a real Source server, Stratum above 0 and a tiny Phase Offset. On a broken PC the Source reads "Local CMOS Clock" and the offset keeps growing.
1
Check the Sync Status First — w32tm /query /status
Do not guess — ask the service what it is doing:
Open Command Prompt as Administrator (w32tm queries and changes need it)
Run w32tm /query /status
Read the Source line. A server name like time.windows.com means it is syncing from the internet. Local CMOS Clock or Free-running System Clock means it is syncing from nothing
Check Last Successful Sync Time with w32tm /query /configuration if the status looks stale
2
Restart the Windows Time Service
A stuck or stopped service is the most common cause. Restart it from the command line:
Stop the service: net stop w32time
Start it again: net start w32time
The same job through the Run box: services.msc, find Windows Time, set Startup type to Automatic and Start it
If the service is missing from the list entirely, re-register it: w32tm /register — then start it with net start w32time
3
Force a Resync — w32tm /resync
Run w32tm /resync /force — Windows contacts the time server immediately instead of waiting for its schedule
Success reads: Sending resync command to local computer — The command completed successfully
Watch the clock correct itself, then run w32tm /query /status again to confirm the Source and a fresh sync time
Error "The service has not been started" means go back to Step 2. Error about no time data usually means the PC cannot reach the time server — check the internet connection and that UDP port 123 is not blocked by a strict firewall
For a detailed report of what the service sees, w32tm /query /peers lists the time servers in use
🔴 Clock wrong again after every shutdown? That pattern is not software. The small coin battery (CMOS battery) on the motherboard keeps time while the PC is off — when it dies, the clock resets or drifts nightly and sync has to fight it every boot. Commands will correct the time each session, but the permanent fix is replacing that inexpensive battery, especially on PCs older than four or five years.
🎥 Watch the Complete Video
w32tm is one of the quiet heroes of the 60 commands — the video shows the whole toolkit it belongs to.
Why does a wrong clock break websites and OTP apps?
Secure websites check that your clock is close to real time before accepting their certificates — a clock that is hours or days off makes every certificate look invalid. OTP apps generate codes from the current time, so a wrong clock produces wrong codes. Fixing the clock often fixes both instantly.
What is the difference between w32tm /resync and /force?
w32tm /resync tells the service to sync now if conditions allow; adding /force makes it sync regardless of the normal waiting period offsets. For a visibly wrong clock, /resync /force is the practical choice.
My office PC will not let me change time settings — why?
Domain-joined office PCs take their time from the company server by design, and w32tm changes may be blocked by policy. That keeps every office PC in step for logins and records. If the whole office clock is wrong, report it to IT — one server fix corrects every PC.
This guide is based on the Technical Anshu 60 Windows Commands video • Stuck on any step? Ask in the video comments — you will get a reply there 🙏