Fix it now
0x80070576 is Win32 1398, “There is a time and/or date difference between the client and server”. Kerberos stamps every request with a timestamp so an intercepted one cannot be replayed later, and it discards anything outside the permitted window. Put the machine back on the domain time hierarchy and resynchronise.
w32tm /query /status
w32tm /config /syncfromflags:domhier /update
net stop w32time
net start w32time
w32tm /resync
- Read the Source line and the last successful sync time from the first command before you change anything. That is your diagnosis.
- Compare against a domain controller directly:
w32tm /stripchart /computer:dc01.contoso.local /dataonly /samples:5. The offset should be a fraction of a second. - Check the time zone is right and automatic time setting is on, then retry the logon.
- If the service will not start at all, re-register it:
w32tm /unregister, thenw32tm /register, then start it again. - On a virtual machine, turn off the guest time synchronisation offered by the integration components, or the hypervisor will keep pulling the guest back off the domain hierarchy.
There is no /force parameter on w32tm /resync. The documented parameters are /computer:<computer>, /nowait, /rediscover and /soft. Given an unrecognised switch, w32tm reports the argument as unexpected, prints its usage block and exits without resynchronising anything.
If the offset is small and a domain logon works, you are done. If the machine drifts back, the next section explains what is pulling it.
Why it happens
Kerberos pre-authentication includes an encrypted timestamp. The domain controller decrypts it and compares it with its own clock, and if the difference is larger than the permitted tolerance the request is discarded, because an old timestamp is what a replayed request looks like. That tolerance is set by the Kerberos policy for maximum tolerance for computer clock synchronisation, whose default is five minutes. When a client drifts past it, every domain logon, every share and every Kerberos-protected application stops at once, which makes it look like a much larger outage than it is.
The comparison is made in universal time, which gives you one of the most useful facts in this area: a wrong time zone does not break Kerberos on its own. A machine showing the wrong wall clock but the correct universal time authenticates perfectly. A machine showing a plausible-looking wall clock in the wrong time zone may be an hour out in universal time and will fail everything. Check the offset against a controller, not the clock on the taskbar.
Time in a domain flows down a hierarchy: members from a domain controller, controllers from the PDC emulator, and that machine from something outside. Where the chain is intact a client cannot drift far, so almost every case of this error is a machine that has been taken out of the chain.
The companion codes describe the same refusal seen from different layers. 0x80090324 is SEC_E_TIME_SKEW, “The clocks on the client and server machines are skewed” – the security package saying it plainly. KRB_AP_ERR_SKEW is Kerberos failure code 0x25, published as “Clock skew too great”, and it is recorded in Security event 4771 on domain controllers rather than on the client. 0x80090308 is SEC_E_INVALID_TOKEN, the token supplied to the function is invalid, and 0x8009030F is SEC_E_MESSAGE_ALTERED, the message or signature supplied for verification has been altered.
The client is not using the domain time hierarchy
You have this one if w32tm /query /source returns an internet name, Local CMOS Clock or Free-running System Clock on a domain-joined machine.
- Reset it:
w32tm /config /syncfromflags:domhier /update, restart the service, thenw32tm /resync. - If the service will not start, re-register it with
w32tm /unregisterthenw32tm /register. - Check Group Policy for a time configuration applied to the wrong scope.
Local CMOS Clock on a domain member always means something took it out of the hierarchy. It will drift again.
A hypervisor is overriding the guest clock
You have this one if A virtual machine corrects itself back to the wrong time within minutes of every resync, especially after a snapshot or a host migration.
- Turn off the guest time synchronisation offered by the integration components or tools package.
- Let the guest use the domain hierarchy instead, then resync and watch it hold for an hour.
- On virtualised domain controllers especially, guest synchronisation should be off.
A snapshot revert can put a machine hours into the past in one step. Resync immediately after any revert.
The time source cannot be reached
You have this one if w32tm /resync reports that no time data was available, and the stripchart returns errors rather than offsets.
- Confirm the client can reach the source with
w32tm /stripchart /computer:<source> /dataonly /samples:5. - Ask whoever runs the firewall to allow UDP 123 outbound from the client subnets to the time source.
- On a machine that is off the domain network, point it at a reachable source with the manual peer list rather than leaving it free-running.
The hardware clock is the problem
You have this one if The time is wrong again after every power-off, or is out by an exact number of hours on a machine that also boots another operating system.
- Replace the motherboard battery on a machine that loses the time entirely when unplugged.
- On dual-boot machines, decide which operating system owns the hardware clock and configure the other to match.
- After correcting it, resync and confirm the offset stays small across a reboot.
Changing how Windows interprets the hardware clock is a registry edit. Export the branch first and do one machine before any others.
The domain itself is wrong
You have this one if Internal logons work, but external services, certificate validation and cloud sign-ins fail across the whole site.
- On the PDC emulator, check
w32tm /query /statusandw32tm /query /configuration. - Point it at a reliable external source with the manual peer list and mark it reliable, then update and restart the service.
- Run
w32tm /monitorfrom a domain controller to see the offset of every controller in the domain at once.
Full reference
The codes, and which machine records each
| Code | Published meaning | Where you see it |
|---|---|---|
0x80070576 |
Win32 1398: there is a time and/or date difference between the client and server | Returned to the application on the client |
0x80090324 |
SEC_E_TIME_SKEW: the clocks on the client and server machines are skewed | The security package, on either machine |
KRB_AP_ERR_SKEW |
Kerberos failure code 0x25: clock skew too great | Security event 4771, on domain controllers only |
0x80090308 |
SEC_E_INVALID_TOKEN: the token supplied to the function is invalid | The security package |
0x8009030F |
SEC_E_MESSAGE_ALTERED: the message or signature supplied for verification has been altered | The security package |
The row worth remembering is the third. Microsoft documents KRB_AP_ERR_SKEW in the failure-code table for event 4771, and states that event is generated on domain controllers only. If you are looking for confirmation and you are looking on the client, you are looking in the wrong place.
Where the drift comes from
| What you see | Likely source |
|---|---|
| One machine is wrong, everything else is fine | It has a manual time source configured, or the service is stopped |
| A virtual machine keeps returning to the wrong time | The hypervisor is synchronising the guest clock over the domain hierarchy |
| Time is wrong after every shutdown | A failing real-time clock battery, or a dual-boot system writing universal time to the hardware clock |
| Every machine agrees but external services fail | The PDC emulator is wrong, so the whole domain is consistently off |
| Sync fails with no reply | UDP 123 is blocked between the client and its time source |
w32tm, with the parameters that exist
| Command | What it does |
|---|---|
w32tm /query /status |
Source, stratum, last successful sync and poll interval |
w32tm /query /source |
Just the source, which is the fastest single check |
w32tm /query /configuration |
Every setting in force, including anything applied by policy |
w32tm /resync |
Resynchronises now. Accepts /computer:<computer>, /nowait, /rediscover and /soft |
w32tm /config /syncfromflags:domhier /update |
Puts a domain member back on the hierarchy |
w32tm /stripchart /computer:<target> /dataonly /samples:5 |
Measures the offset against a named machine |
w32tm /monitor |
From a controller, shows the offset of every controller in the domain |
There is no /force switch on w32tm /resync, and advice to run one is common. w32tm validates its arguments strictly: an unrecognised switch makes it report the argument as unexpected, print its usage block and exit without resynchronising. If you have been running that command and nothing changed, that is why.
Before you widen the tolerance
The Kerberos policy setting for maximum tolerance for computer clock synchronisation can be changed, and somebody will suggest it. Widening it weakens replay protection for the entire domain in order to work around one machine’s broken clock, and it does not remove the drift – it just delays the day the machine crosses the new line as well.
- Fix the clock. It is a five minute job and it stays fixed.
- If several machines drift, fix the hierarchy rather than the tolerance.
- If a virtual estate drifts after every snapshot, fix the guest synchronisation setting in the template so new machines inherit it.
- Reserve any tolerance change for a specific, documented, temporary situation with a date on it.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
0x80070576 |
Win32 1398, ERROR_TIME_SKEW: there is a time and/or date difference between the client and server | Microsoft Learn |
0x80090308 |
SEC_E_INVALID_TOKEN: the token supplied to the function is invalid | Microsoft Learn |
0x8009030F |
SEC_E_MESSAGE_ALTERED: the message or signature supplied for verification has been altered | Microsoft Learn |
KRB_AP_ERR_SKEW |
Kerberos failure code 0x25, published as “Clock skew too great” in the failure-code table for Security event 4771, which is generated on domain controllers only | Microsoft Learn |
0x80090324 |
SEC_E_TIME_SKEW: the clocks on the client and server machines are skewed | Microsoft Learn |
Confirm the fix worked
w32tm /query /statusshows a domain controller as the source and a recent successful sync.w32tm /stripchart /computer:<dc> /dataonly /samples:5shows an offset well under a second.- Sign in with a domain account on the repaired machine and open a share that previously failed.
- Reboot, wait for the next poll, and confirm the time holds rather than drifting back.
- On a virtual machine, revert nothing and simply leave it an hour, then check the offset again.
Questions people ask about this
Does anything here cost money?
No. The Windows Time service, w32tm and the domain time hierarchy are part of Windows. Unless you are replacing a motherboard battery, this costs nothing but a few minutes at a command prompt.
Why did w32tm /resync /force do nothing?
Because /force is not a parameter of that command. The documented ones are /computer:<computer>, /nowait, /rediscover and /soft. w32tm rejects the unrecognised switch, prints its usage and exits without resynchronising, so the machine’s clock is exactly where it was.
Can I widen the five-minute tolerance?
The Kerberos policy setting exists and can be changed in the Default Domain Policy, but widening it weakens replay protection for the whole domain to work around one broken clock, and the drifting machine will cross the new line eventually too. Fix the clock.
Is a wrong time zone enough to break logon?
Not by itself. Kerberos compares universal time, so a machine in the wrong zone with the correct universal time authenticates fine. It matters when the zone is wrong and somebody has corrected the displayed clock by hand, which puts universal time out by the offset.
Why did every machine in the office fail at once?
Because the fault is above them. Either the PDC emulator drifted and took the domain with it, or the path to the time source broke. Check the top of the hierarchy before touching individual clients.
