How to sync your clock
If your device clock is off, timestamps, two-factor codes, calendar reminders and secure connections can all misbehave. Turning on automatic time sync fixes it in under a minute.
Checking your clock…
Showing instructions for Windows. Not your device? Pick it above.
Windows 11 & 10
- Right-click the clock in the taskbar and choose Adjust date and time. (Or open Settings › Time & language › Date & time.)
- Turn on Set time automatically.
- Click Sync now. The time next to it should update to “just now”.
- Check that Time zone is correct — a wrong zone looks like a clock that is out by whole hours.
If “Sync now” fails
Open Command Prompt or PowerShell as administrator and run:
w32tm /resync
If that reports the service is not running, start it first:
net start w32time
w32tm /resync
If “Sync now” succeeds but you are still under a second out
Windows only jumps the clock when the error is larger than MaxAllowedPhaseOffset, which defaults to one second. A smaller error is corrected by gently adjusting the tick rate instead, and that only continues while the Windows Time service is running. The service is trigger-started, so Windows stops it again soon after the sync and abandons the correction part-way. That is why Sync now can report success every time while a fraction-of-a-second error survives indefinitely.
In PowerShell as administrator, keep the service running and let Windows correct sub-second errors outright:
Set-Service W32Time -StartupType Automatic
Start-Service W32Time
Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Config' -Name MaxAllowedPhaseOffset -Value 0 -Type DWord
w32tm /config /update
Restart-Service W32Time
w32tm /resync /force
Measure the result without leaving the console — the offsets should come back in milliseconds rather than tenths of a second:
w32tm /stripchart /computer:time.cloudflare.com /samples:5 /dataonly
Setting MaxAllowedPhaseOffset to 0 also lets Windows step the clock backwards when it runs fast, which a few time-sensitive applications dislike. To avoid that, leave the value at 1 and only set the service to Automatic — the gradual correction then works, but takes hours to absorb a full second.
Sync more often so it does not drift back
A PC clock left to itself typically gains or loses a second or more a day, and Windows 11 only checks in every 32768 seconds — a little over nine hours. Polling hourly keeps the error far smaller between checks:
Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient' -Name SpecialPollInterval -Value 3600 -Type DWord
Restart-Service W32Time
This interval only applies when the configured server carries the 0x1 flag. The Windows default of time.windows.com,0x9 already includes it, so there is normally nothing else to change — check yours with w32tm /query /source and the Internet Time tab below.
Use a different time server
Control Panel › Clock and Region › Date and Time › Internet Time tab › Change settings. Set the server to time.windows.com or pool.ntp.org, then click Update now.
Worth trying if syncs fail outright, though it rarely explains a small offset: the public time servers agree with each other to within a few milliseconds, so a clock that is a noticeable fraction of a second out is not being misled by its server.
macOS
- Open the Apple menu › System Settings.
- Go to General › Date & Time.
- Turn on Set time and date automatically. The source should read
time.apple.com. - Confirm Set time zone automatically using your current location is on.
On macOS Monterey and earlier the path is System Preferences › Date & Time; click the padlock to unlock it first.
Force a resync from Terminal
sudo sntp -sS time.apple.com
iPhone & iPad
- Open Settings › General › Date & Time.
- Turn on Set Automatically.
- If it is greyed out, check Settings › Screen Time › Content & Privacy Restrictions — date & time changes can be blocked there.
- Still wrong? Toggle Airplane Mode on and off, or restart the device, to force it to fetch the network time again.
iOS gets its time from the mobile network or Wi-Fi, so a device that has been offline for a long time may need a moment after reconnecting.
Android
- Open Settings › System › Date & time. On Samsung devices it is Settings › General management › Date and time.
- Turn on Set time automatically (some versions call this Use network-provided time).
- Turn on Set time zone automatically as well.
- If the option is already on but the clock is still wrong, switch it off and on again to force a refresh.
Linux
Most modern distributions use systemd-timesyncd. Enable network time and check the result:
sudo timedatectl set-ntp true
timedatectl status
Look for System clock synchronized: yes. To force it:
sudo systemctl restart systemd-timesyncd
If you use chrony
sudo chronyc makestep
chronyc tracking
If you use ntpd
sudo ntpd -gq
ChromeOS
- ChromeOS sets the time automatically and cannot be set by hand, so a wrong clock is almost always a wrong time zone.
- Open Settings › Advanced › Date and time.
- Set Time zone to Choose from list and pick your region, or let it use your location.
- If it is still wrong, sign out and back in, or restart the Chromebook.
Why an accurate clock matters
Logins and 2FA
Authenticator codes are derived from the current time. A clock that is off by more than about 30 seconds makes them fail.
Secure connections
Certificates are only valid between two dates, so a badly wrong clock causes “your connection is not private” warnings on sites that are perfectly fine.
Meetings and reminders
Calendar alerts, timers and scheduled jobs all fire against the local clock, so they drift with it.