Software & OS

How to Enable Set Time Automatically in Windows

To enable set time automatically in Windows, open Start, then Settings, then Time & language, then Date & time, and turn on Set time automatically. To force a correction from the command prompt, run w32tm /resync in a window opened as administrator.

The steps below cover the Settings app, the command line, and the cases where the toggle does nothing or the clock keeps drifting.

How to turn on Set time automatically in Settings

  1. Select Start, then Settings.
  2. Go to Time & language, then Date & time.
  3. Make sure the toggle Set time automatically is On.
  4. Make sure Set time zone automatically is also On, unless you want to pick the zone yourself.

This is the path Microsoft documents. Menu labels can move slightly between Windows builds, but the two toggle names stay the same. When Set time automatically is on, Windows asks a time server for the correct time and adjusts the clock, so you no longer type the time in.

Set time zone automatically and daylight saving time

The clock and the time zone are two separate settings. Set time automatically corrects the time itself. Set time zone automatically chooses the zone. According to Microsoft, when the zone toggle is on, daylight saving time is set automatically as well.

If you turn the zone toggle off, a time zone drop-down appears and you pick the zone by hand. Then the option Adjust for daylight saving time automatically should be on, so the clock moves on the right dates. If you only want to check what a zone offset means, UTC vs CST explains how a zone relates to UTC.

How to set the time manually instead

To go the other way, switch Set time automatically to Off. A Change button then appears next to Set the date and time. Select it, enter the date and time, and confirm. Windows keeps that value and stops correcting it from a server. A manually set clock drifts, so use this only for a machine that has no network access, or for a test.

How to force a sync from the command line

The Windows Time service (W32Time) does the work behind the toggle, and w32tm is its command-line tool. Microsoft states that membership in the local Administrators group is required to run it locally. To open the right window, select Start, type cmd, right-click Command Prompt and choose Run as administrator. Then run:

w32tm /resync

This tells the computer to resynchronize its clock as soon as possible. By default the command waits until the resynchronization has finished before it returns. Example output on a healthy machine:

Sending resync command to local computer
The command completed successfully.

The command takes these options:

OptionWhat it does
/nowaitReturns immediately instead of waiting for the sync to finish.
/rediscoverRedetects the network configuration, rediscovers network time sources, then resynchronizes. Use it after changing networks or a VPN.
/softResynchronizes using existing error statistics. Microsoft says it exists for compatibility.
/computer:<name>Resynchronizes another computer. Running this remotely needs Domain Admins membership.

If a plain /resync fails, try w32tm /resync /rediscover first.

Check where the time comes from

Two read-only queries tell you whether automatic time is working:

w32tm /query /source
w32tm /query /status

/source prints the time source. On a stand-alone PC with default settings you should see time.windows.com, which is the default NtpServer value Microsoft lists for computers that are not in a domain. /status prints a block of fields. Example output, trimmed:

Leap Indicator: 0(no warning)
Stratum: 3 (secondary reference - syncd by (S)NTP)
Last Successful Sync Time: 11/18/2026 8:14:02 AM
Source: time.windows.com,0x1
Poll Interval: 10 (1024s)
Phase Offset: 0.0012345s
Last Sync Error: 0 (The command completed successfully.)

The fields to read are Last Successful Sync Time, Source and Last Sync Error. A recent sync time and error code 0 mean the clock is being corrected. Phase Offset is the difference, in seconds, between your clock and the source at the last sample.

Why the clock is still wrong

Work through these in order.

  • The toggle is off or greyed out. Turn it on. If you cannot, the settings may be controlled by policy. Microsoft documents Group Policy settings for the time service under Computer Configuration\Administrative Templates\System\Windows Time Service, and values set there overwrite existing values in the W32Time registry section.
  • UDP port 123 is blocked. W32Time follows the NTP specification, which uses UDP port 123 for all synchronization, and the built-in NTP client can only use 123 as its source port. A firewall that drops outbound UDP 123 stops the sync.
  • The service is stopped or stuck. From an administrator prompt, run net stop w32time, then net start w32time, then w32tm /resync. Microsoft uses the same stop and start pair after changing the sync source.
  • The computer was left on a manual source. A PC that used to be set to a specific server can be pointed back at the domain hierarchy with w32tm /config /syncfromflags:domhier /update, followed by the service restart above. That applies to domain-joined computers. For a home PC, the Settings toggle is the supported route.
  • Syncs are far apart. For stand-alone clients, Microsoft lists a default special poll interval of 604,800 seconds, which is 7 days. A clock can therefore drift between syncs, and w32tm /resync corrects it on demand.

Does a large time error get fixed gradually?

It depends on the size of the error. W32Time compares the offset with MaxAllowedPhaseOffset. If the offset is at or below that value, it adjusts the clock gradually by changing the clock rate. If the offset is larger, it sets the clock immediately. Microsoft lists the default as 1 second for stand-alone clients, so a clock that is several minutes wrong is set directly rather than slowly nudged. That is why the time can visibly jump right after you press resync.

If it still fails

Run w32tm /query /status and read Last Sync Error and Source. An error code other than 0 together with a firewall that blocks UDP 123 points to a network problem rather than a Windows setting. A source that names a server you do not recognize points to a manual configuration, which w32tm /query /configuration will show in full.

Frequently asked questions

Why is Set time automatically greyed out?
On a computer that is managed by an organization, time settings can be set by policy. Windows Time Service settings can be pushed through Group Policy (Computer Configuration, Administrative Templates, System, Windows Time Service), so the person who administers the device has to change them. On a personal PC, check that you are signed in with an administrator account.
Which time server does Windows use by default?
On a stand-alone computer that is not joined to a domain, the default NtpServer value is time.windows.com. Domain-joined computers instead take their time from the domain hierarchy, so the time source is a domain controller.
Does Set time automatically also set the time zone?
No. The time zone has its own toggle, Set time zone automatically, on the same Date & time page. Setting the clock from a time server fixes the time itself, while the zone decides how that time is displayed locally.
Do I need to run w32tm if the toggle is already on?
Usually not. The toggle lets the Windows Time service keep the clock in sync in the background. Run w32tm /resync only when you want to force a correction right away, or w32tm /query /status to see when the last successful sync happened.

Sources