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

  1. Open Settings → Time & language → Date & time.
  2. Make sure Set time automatically is switched on.
  3. 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:

  1. Press Windows + R, type timedate.cpl and press Enter.
  2. Open the Internet Time tab and click Change settings.
  3. Enter ptbtime1.ptb.de as 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)

  1. Open System Settings → General → Date & Time.
  2. Make sure Set time and date automatically is on.
  3. 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

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?