How to sync your computer’s clock
Computers and phones set their own clocks over the internet, but often only once a day or once a week, and sometimes from a distant server. Here is how to sync yours now, how to point it at a better time server, and how to check the result.
First, check your clock: open the clock page. It tells you how far your device is off, for example “Your clock is 1.284 s behind”. Anything within about a tenth of a second is fine for everyday use.
Windows 10 and 11
- Open Settings → Time & language → Date & time.
- Make sure Set time automatically is switched on.
- Under Additional settings, click Sync now.
Use a better time server. Windows uses time.windows.com and syncs only rarely. To use the German national time institute instead:
- Press Windows + R, type
timedate.cpland press Enter. - Open the Internet Time tab and click Change settings.
- Enter
ptbtime1.ptb.deas the server and click Update now, then OK.
Or, in a Command Prompt opened as administrator:
w32tm /config /manualpeerlist:"ptbtime1.ptb.de,0x8 ptbtime2.ptb.de,0x8" /syncfromflags:manual /update w32tm /resync w32tm /query /status
The Windows Time service is designed for everyday accuracy, around a second, rather than for precision. If you need better, the free Meinberg NTP software for Windows replaces it with full NTP.
Mac (macOS Ventura and newer)
- Open System Settings → General → Date & Time.
- Make sure Set time and date automatically is on.
- Optionally, click the source next to it (time.apple.com) and enter
ptbtime1.ptb.de.
To sync immediately, open Terminal and run:
sudo sntp -sS ptbtime1.ptb.de
To only see how far off your Mac is, without changing anything, run sntp ptbtime1.ptb.de.
Linux
Most distributions run systemd-timesyncd or chrony. Check the state with:
timedatectl status
It should say System clock synchronized: yes. If not, turn synchronisation on with sudo timedatectl set-ntp true. To choose your own servers, use the configuration generator on our NTP server list: select a few servers and copy the lines for chrony, ntpd or timesyncd. For authenticated time, see NTS with chrony.
Android and iPhone
- Android: Settings → System → Date & time → Set time automatically (names vary slightly by manufacturer).
- iPhone and iPad: Settings → General → Date & Time → Set Automatically.
Phones take the time from the network and from time servers, and are usually within a fraction of a second. If yours is off, switching the automatic setting off and on again forces a new sync.
Still off after syncing?
- Wrong time zone: if the minutes are right but the hour is wrong, check the time zone setting rather than the clock.
- Firewall: time synchronisation uses UDP port 123. Some company and hotel networks block it.
- Dual boot: Windows and Linux on the same computer can disagree about whether the hardware clock is in local time or UTC, which shifts the clock by your time zone offset after switching.