0% found this document useful (0 votes)
245 views21 pages

Windows Time Service Tools and Settings

This document provides information about tools and settings for the Windows Time service (W32Time). It describes the W32tm.exe tool which can be used to configure, monitor, and troubleshoot the Windows Time service from the command line. It also provides details on parameters for W32tm.exe and explains other time service settings that can be configured through the W32tm.exe /config command.

Uploaded by

Obdulio Santana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
245 views21 pages

Windows Time Service Tools and Settings

This document provides information about tools and settings for the Windows Time service (W32Time). It describes the W32tm.exe tool which can be used to configure, monitor, and troubleshoot the Windows Time service from the command line. It also provides details on parameters for W32tm.exe and explains other time service settings that can be configured through the W32tm.exe /config command.

Uploaded by

Obdulio Santana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Windows Time Service Tools and

Settings
 10/15/2018

Applies to: Windows Server 2016, Windows Server 2012 R2, Windows Server 2012,
Windows 10 or later

In this topic, you learn about tools and settings for Windows Time service (W32Time).

If you only want to synchronize time for a domain-joined client computer, see
Configure a client computer for automatic domain time synchronization. For additional
topics about how to configure Windows Time service, see Where to Find Windows
Time Service Configuration Information.

Caution

You should not use the Net time command to configure or set time when the Windows
Time service is running.

Also, on older computers that run Windows XP or earlier, the command Net time
/querysntp displays the name of a Network Time Protocol (NTP) server with which a
computer is configured to synchronize, but that NTP server is used only when the
computer's time client is configured as NTP or AllSync. That command has since been
deprecated.

Most domain member computers have a time client type of NT5DS, which means that
they synchronize time from the domain hierarchy. The only typical exception to this is
the domain controller that functions as the primary domain controller (PDC) emulator
operations master of the forest root domain, which is usually configured to synchronize
time with an external time source. To view the time client configuration of a computer,
run the W32tm /query /configuration command from an elevated Command Prompt in
starting in Windows Server 2008, and Windows Vista, and read the Type line in the
command output. For more information, see How Windows Time Service Works. You
can run the command reg query
HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters and read the
value of NtpServer in the command output.

Important

Prior to Windows Server 2016, the W32Time service was not designed to meet time-
sensitive application needs. However, updates to Windows Server 2016 now allow you
to implement a solution for 1ms accuracy in your domain. See Windows 2016 Accurate
Time and Support boundary to configure the Windows Time service for high-accuracy
environments for more information.
Windows Time Service Tools
The following tools are associated with the Windows Time service.

W32tm.exe: Windows Time

Category

This tool is installed as part of Windows XP, Windows Vista, Windows 7 , Windows
Server 2003, Windows Server 2003 R2, Windows Server 2008 , and Windows Server
2008 R2 default installations.

Version compatibility

This tool works on Windows XP, Windows Vista, Windows 7 , Windows Server 2003,
Windows Server 2003 R2, Windows Server 2008 , and Windows Server 2008 R2
default installations.

W32tm.exe is used to configure Windows Time service settings. It can also be used to
diagnose problems with the time service. W32tm.exe is the preferred command line tool
for configuring, monitoring, or troubleshooting the Windows Time service.

The following tables describe the parameters that are used with W32tm.exe.

W32tm.exe Primary Parameters

Parameter Description
W32tm /? W32tm command line help
Registers the time service to run as a service and adds
W32tm /register
default configuration to the registry.
Unregisters the time service and removes all configuration
W32tm /unregister
information from the registry.
domain - specifies which domain to monitor. If no domain
name is given, or neither the domain nor computers option is
specified, the default domain is used. This option might be
used more than once.
w32tm /monitor
computers - monitors the given list of computers. Computer
[/domain:] names are separated by commas, with no spaces. If a name
[/computers:[,[,...]]] is prefixed with a '*', it is treated as a PDC. This option
[/threads:] might be used more than once.

threads - specifies the number of computers to analyze


simultaneously. The default value is 3. Allowed range is 1-
50.
Convert an NT system time, in (10^-7)s intervals from 0h 1-
w32tm /ntte
Jan 1601, into a readable format.
w32tm /ntpte Convert an NTP time, in (2^-32)s intervals from 0h 1-Jan
Parameter Description
1900, into a readable format.
Tells a computer that it should resynchronize its clock as
soon as possible, throwing out all accumulated error
statistics.

w32tm /resync computer: - Specifies the computer that should


resynchronize. If not specified, the local computer will
[/computer:] resynchronize.

[/nowait] nowait - do not wait for the resynchronize to occur; return


immediately. Otherwise, wait for the resynchronize to
[/rediscover] complete before returning.

[/soft] rediscover - Redetect the network configuration and


rediscover network sources, then resynchronize.

soft - resynchronize using existing error statistics. Not


useful, provided for compatibility.
Display a strip chart of the offset between this computer and
another computer.

computer: - the computer to measure the offset against.

period: - the time between samples, in seconds. The default


is 2s.

dataonly - display only the data without graphics.


w32tm /stripchart
samples: - collect samples, then stop. If not specified,
/computer: samples will be collected until Ctrl+C is pressed.

[/period:] rdtsc: for each sample, this option prints comma separated
values along with the headers RdtscStart, RdtscEnd,
[/dataonly] FileTime, RoundtripDelay, NtpOffset instead of the text
graphic.
[/samples:]
 RdtscStart – RDTSC (Read TimeStamp Counter)
[/rdtsc] value collected just before the NTP request was
generated.
 RdtscEnd – RDTSC (Read TimeStamp Counter)
value collected just after the NTP response was
received and processed.
 FileTime – Local FILETIME value used in the NTP
request.
 RoundtripDelay – Time elapsed in seconds between
generating the NTP request and processing the
received NTP response, computed as per NTP
roundtrip computations.
Parameter Description
 NTPOffset – Time offset in seconds between the
local machine and the NTP server, computed as per
NTP offset computations.

computer: - adjusts the configuration of . If not specified, the


default is the local computer.

update - notifies the time service that the configuration has


changed, causing the changes to take effect.

manualpeerlist: - sets the manual peer list to , which is a


space-delimited list of DNS and/or IP addresses. When
specifying multiple peers, this option must be enclosed in
quotes.
w32tm /config
syncfromflags: - sets what sources the NTP client should
[/computer:] synchronize from. should be a comma separated list of these
keywords (not case sensitive):
[/update]
MANUAL - include peers from the manual peer list.
[/manualpeerlist:]
DOMHIER - synchronize from a domain controller (DC) in
[/syncfromflags:] the domain hierarchy.

[/LocalClockDispersion:] LocalClockDispersion: - configures the accuracy of the


internal clock that W32Time will assume when it can't
[/reliable:(YES|NO)] acquire time from its configured sources.

[/largephaseoffset:] reliable:(YES|NO) - set whether this computer is a reliable


time source.

This setting is only meaningful on domain controllers.

YES - this computer is a reliable time service.

NO - this computer is not a reliable time service.

largephaseoffset: - sets the time difference between local


and network time which W32Time will consider a spike.
w32tm /tz Display the current time zone settings.
Display the values associated with a given registry key.
w32tm /dumpreg
The default key is
HKLM\System\CurrentControlSet\Services\W32Time
[/subkey:]
(the root key for the time service).
[/computer:]
subkey: - displays the values associated with subkey of the
Parameter Description
default key.

computer: - queries registry settings for computer


This parameter was first made available in the Windows
Time client versions of Windows Vista, and Windows
Server 2008 .

Display a computer's Windows Time service information.

computer: - Query the information of . If not specified, the


default value is the local computer.
w32tm /query
[/computer:] {/source | Source - Display the time source.
/configuration | /peers |
/status} [/verbose] Configuration - Display the configuration of run time and
where the setting comes from. In verbose mode, display the
undefined or unused setting too.

peers - Display a list of peers and their status.

status - Display Windows Time service status.

verbose - Set the verbose mode to display more information.


This parameter was first made available in the Windows
Time client versions of Windows Vista, and Windows
Server 2008 .

Enable or disable the local computer Windows Time service


private log.

disable - Disable the private log.


w32tm /debug {/disable |
enable - Enable the private log.
{/enable /file: /size:
/entries: [/truncate]}}
- file: - Specify the absolute file name.
- size: - Specify the maximum size for circular logging.
- entries: - Contains a list of flags, specified by number and
separated by commas, that specify the types of information
that should be logged. Valid numbers are 0 to 300. A range
of numbers is valid, in addition to single numbers, such as 0-
100,103,106. Value 0-300 is for logging all information.

truncate - Truncate the file if it exists.

For more information about W32tm.exe, see Help and Support Center in Windows XP,
Windows Vista, Windows 7 , Windows Server 2003, Windows Server 2003 R2,
Windows Server 2008 , and Windows Server 2008 R2.
Windows Time Service Registry Entries
The following registry entries are associated with the Windows Time service.

This information is provided as a reference for use in troubleshooting or verifying that


the required settings are applied. It is recommended that you do not directly edit the
registry unless there is no other alternative. Modifications to the registry are not
validated by the registry editor or by Windows before they are applied, and as a result,
incorrect values can be stored. This can result in unrecoverable errors in the system.

When possible, use Group Policy or other Windows tools, such as Microsoft
Management Console (MMC), to accomplish tasks rather than editing the registry
directly. If you must edit the registry, use extreme caution.

Warning

Some of the preset values that are configured in the System Administrative template file
(System.adm) for the Group Policy object (GPO) settings are different from the
corresponding default registry entries. If you plan to use a GPO to configure any
Windows Time setting, be sure that you review Preset values for the Windows Time
service Group Policy settings are different from the corresponding Windows Time
service registry entries in Windows Server 2003. This issue applies to Windows Server
2008 R2 , Windows Server 2008 , Windows Server 2003 R2, and Windows Server
2003.

Many registry entries for the Windows Time service are the same as the Group Policy
setting of the same name. The Group Policy settings correspond to the registry entries of
the same name located in:

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\

There are several registry keys at this registry location. The Windows Time settings are
stored in values across all of these keys:

 Parameters
 Config
 NtpClient
 NtpServer

Many of the values in the W32Time section of the registry are used internally by
W32Time to store information. These values should not be manually changed at any
time. Do not modify any of the settings in this section unless you are familiar with the
setting and are certain that the new value will work as expected. The following registry
entries are located under:

HKLM\SYSTEM\CurrentControlSet\Services\W32Time

When you create a policy, the settings are configured in the following location, which
does not take precedence over the next location:
HKLM\SOFTWARE\Policies\Microsoft\Windows\W32time

The W32time key is created with the policy. When you remove the policy, then this key
is also removed.

The other default location:

HKLM\SYSTEM\CurrentControlSet\Services\W32time

Some of the parameters are stored in clock ticks in the registry and some are in seconds.
To convert the time from clock ticks to seconds:

 1 minute = 60 sec
 1 sec = 1000 ms
 1 ms = 10,000 clock ticks on a Windows system, as described at
DateTime.Ticks Property.

For example, 5 minutes would become 5*60*1000*10000 = 3000000000 clock ticks.

All versions include Windows 7, Windows 8, Windows 10, Windows Server 2008 , and
Windows Server 2008 R2, Windows Server 2012, Windows Server 2012R2, Windows
Server 2016. Some entries are only availalbe on newer Windows versions.

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Registry Entry Version Description


Entry indicates that non-standard mode
combinations are allowed in
synchronization between peers. The
AllowNonstandardModeCombinations All
default value for domain members is 1.
The default value for stand-alone
clients and servers is 1.
Entry specifies a space-delimited list of
peers from which a computer obtains
time stamps, consisting of one or more
DNS names or IP addresses per line.
Each DNS name or IP address listed
must be unique. Computers connected
to a domain must synchronize with a
more reliable time source, such as the
NtpServer All
official U.S. time clock.

 0x01 SpecialInterval
 0x02 UseAsFallbackOnly
 0x04 SymmetricActive - For
more information about this
mode, see Windows Time
Server: 3.3 Modes of Operation.
Registry Entry Version Description
 0x08 Client

There is no default value for this


registry entry on domain members. The
default value on stand-alone clients and
servers is time.windows.com,0x1.

Note: For more information on


available NTP Servers, see Microsoft
Knowledge Base article 262680 - A list
of the Simple Network Time Protocol
(SNTP) time servers that are available
on the Internet
Entry is maintained by W32Time. It
contains reserved data that is used by
the Windows operating system, and any
changes to this setting can cause
ServiceDll All unpredictable results. The default
location for this DLL on both domain
members and stand-alone clients and
servers is
%windir%\System32\W32Time.dll.
Entry is maintained by W32Time. It
contains reserved data that is used by
the Windows operating system, and any
changes to this setting can cause
ServiceMain All unpredictable results. The default value
on domain members is
SvchostEntry_W32Time. The default
value on stand-alone clients and servers
is SvchostEntry_W32Time. "
Entry indicates which peers to accept
synchronization from:

 NoSync. The time service does


not synchronize with other
sources.
 NTP. The time service
Type All synchronizes from the servers
specified in the NtpServer.
registry entry.
 NT5DS. The time service
synchronizes from the domain
hierarchy.
 AllSync. The time service uses
all the available synchronization
Registry Entry Version Description
mechanisms.

The default value on domain members


is NT5DS. The default value on stand-
alone clients and servers is NTP.

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config

Registry Entry Version Description


Entry controls whether this computer is marked as
a reliable time server. A computer is not marked
as reliable unless it is also marked as a time
server.
- 0x00 Not a time server
- 0x01 Always time server
AnnounceFlags All
- 0x02 Automatic time server
- 0x04 Always reliable time server
- 0x08 Automatic reliable time server
The default value for domain members is 10. The
default value for stand-alone clients and servers is
10.
Entry controls the events that the time service
logs.
- Time Jump: 0x1
EventLogFlags All - Source Change: 0x2
The default value on domain members is 2. The
default value on stand-alone clients and servers is
2.
Entry controls the rate at which the clock is
corrected. If this value is too small, the clock is
unstable and overcorrects. If the value is too large,
the clock takes a long time to synchronize. The
default value on domain members is 4. The
default value on stand-alone clients and servers is
4.
FrequencyCorrectRate All
Note that 0 is an invalid value for the
FrequencyCorrectRate registry entry. On
Windows Server 2003, Windows Server 2003 R2,
Windows Server 2008 , and Windows Server
2008 R2 computers, if the value is set to 0 the
Windows Time service will automatically change
it to 1.
Entry controls the period of time for which spike
detection is disabled in order to bring the local
HoldPeriod All
clock into synchronization quickly. A spike is a
time sample indicating that time is off a number
Registry Entry Version Description
of seconds, and is usually received after good time
samples have been returned consistently. The
default value on domain members is 5. The
default value on stand-alone clients and servers is
5.
Entry specifies that a time offset greater than or
equal to this value in 10-7 seconds is considered a
spike. A network disruption such as a large
amount of traffic might cause a spike. A spike will
LargePhaseOffset All
be ignored unless it persists for a long period of
time. The default value on domain members is
50000000. The default value on stand-alone
clients and servers is 50000000.
Entry is maintained by W32Time. It contains
reserved data that is used by the Windows
operating system, and any changes to this setting
LastClockRate All
can cause unpredictable results. The default value
on domain members is 156250. The default value
on stand-alone clients and servers is 156250.
Entry controls the dispersion (in seconds) that you
must assume when the only time source is the
LocalClockDispersion All built-in CMOS clock. The default value on
domain members is 10. The default value on
stand-alone clients and servers is 10.
Entry specifies the maximum offset (in seconds)
for which W32Time attempts to adjust the
computer clock by using the clock rate. When the
offset exceeds this rate, W32Time sets the
MaxAllowedPhaseOffset All
computer clock directly. The default value for
domain members is 300. The default value for
stand-alone clients and servers is 1. See below for
more information.
Entry is maintained by W32Time. It contains
reserved data that is used by the Windows
operating system, and any changes to this setting
MaxClockRate All
can cause unpredictable results. The default value
for domain members is 155860. The default value
for stand-alone clients and servers is 155860.
Entry specifies the largest negative time
correction in seconds that the service makes. If the
service determines that a change larger than this is
required, it logs an event instead. Special case:
MaxNegPhaseCorrection All
0xFFFFFFFF means always make time
correction. The default value for domain members
is 0xFFFFFFFF. The default value for stand-alone
clients and servers is 54,000 (15 hrs).
MaxPollInterval All Entry specifies the largest interval, in log2
Registry Entry Version Description
seconds, allowed for the system polling interval.
Note that while a system must poll according to
the scheduled interval, a provider can refuse to
produce samples when requested to do so. The
default value for domain controllers is 10. The
default value for domain members is 15. The
default value for stand-alone clients and servers is
15.
Entry specifies the largest positive time correction
in seconds that the service makes. If the service
determines that a change larger than this is
required, it logs an event instead. Special case:
MaxPosPhaseCorrection All
0xFFFFFFFF means always make time
correction. The default value for domain members
is 0xFFFFFFFF. The default value for stand-alone
clients and servers is 54,000 (15 hrs).
Entry is maintained by W32Time. It contains
reserved data that is used by the Windows
operating system, and any changes to this setting
MinClockRate All
can cause unpredictable results. The default value
for domain members is 155860. The default value
for stand-alone clients and servers is 155860.
Entry specifies the smallest interval, in log2
seconds, allowed for the system polling interval.
Note that while a system does not request samples
more frequently than this, a provider can produce
MinPollInterval All samples at times other than the scheduled interval.
The default value for domain controllers is 6. The
default value for domain members is 10. The
default value for stand-alone clients and servers is
10.
Entry controls the rate at which the phase error is
corrected. Specifying a small value corrects the
phase error quickly, but might cause the clock to
become unstable. If the value is too large, it takes
a longer time to correct the phase error.

The default value on domain members is 1. The


default value on stand-alone clients and servers is
PhaseCorrectRate All
7.

Note: 0 is an invalid value for the


PhaseCorrectRate registry entry. On Windows
Server 2003, Windows Server 2003 R2, Windows
Server 2008 , and Windows Server 2008 R2
computers, if the value is set to 0, the Windows
Time service automatically changes it to 1.
PollAdjustFactor All Entry controls the decision to increase or decrease
Registry Entry Version Description
the poll interval for the system. The larger the
value, the smaller the amount of error that causes
the poll interval to be decreased. The default value
on domain members is 5. The default value on
stand-alone clients and servers is 5.
Entry specifies the amount of time that a
suspicious offset must persist before it is accepted
SpikeWatchPeriod All as correct (in seconds). The default value on
domain members is 900. The default value on
stand-alone clients and workstations is 900.
An unsigned integer that indicates the time jump
audit threshold, in seconds. If the time service
TimeJumpAuditOffset All adjusts the local clock by setting the clock
directly, and the time correction is more than this
value, then the time service logs an audit event.
Entry specifies the number of clock ticks between
phase correction adjustments. The default value
for domain controllers is 100. The default value
for domain members is 30,000. The default value
for stand-alone clients and servers is 360,000.

NOTE: Zero is an invalid value for the


UpdateInterval registry entry. On computers
running Windows Server 2003, Windows Server
2003 R2, Windows Server 2008 , and Windows
Server 2008 R2 , if the value is set to 0 the
Windows Time service automatically changes it to
1.

The following three registry entries are not a part


of the W32Time default configuration but can be
UpdateInterval All added to the registry to obtain increased logging
capabilities. The information logged to the System
Event log can be modified by changing value for
the EventLogFlags setting in the Group Policy
Object Editor. By default, the time service creates
a log in Event Viewer every time that it switches
to a new time source.

WARNING: Some of the preset values that are


configured in the System Administrative template
file (System.adm) for the Group Policy object
(GPO) settings are different from the
corresponding default registry entries. If you plan
to use a GPO to configure any Windows Time
setting, be sure that you review Preset values for
the Windows Time service Group Policy settings
are different from the corresponding Windows
Registry Entry Version Description
Time service registry entries in Windows Server
2003. This issue applies to Windows Server 2008
R2, Windows Server 2008, Windows Server 2003
R2, and Windows Server 2003.
Post
Entry of 1 indicates that the W32Time will use
Windows
UtilizeSslTimeData multiple SSL timestamps to Seed a clock that is
10 build
grossly inaccurate.
1511

The following registry entries must be added in order to enable W32Time logging:

Registry
Version Description
Entry
Entry controls the amount of entries created in the Windows
Time log file. The default value is none, which does not log
FileLogEntries All any Windows Time activity. Valid values are 0 to 300. This
value does not affect the event log entries normally created by
Windows Time
Entry controls the location and file name of the Windows Time
log. The default value is blank, and should not be changed
unless FileLogEntries is changed. A valid value is a full path
FileLogName All
and file name that Windows Time will use to create the log file.
This value does not affect the event log entries normally
created by Windows Time.
Entry controls the circular logging behavior of Windows Time
log files. When FileLogEntries and FileLogName are defined,
Entry defines the size, in bytes, to allow the log file to reach
FileLogSize All before overwriting the oldest log entries with new entries.
Please use 1000000 or larger value for this setting. This value
does not affect the event log entries normally created by
Windows Time.

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClien
t

Registry Entry Version Description


Entry indicates that non-standard mode
combinations are allowed in
synchronization between peers. The
AllowNonstandardModeCombinations All
default value for domain members is 1.
The default value for stand-alone
clients and servers is 1.
Entry specifies the following
CompatibilityFlags All compatibility flags and values:
Registry Entry Version Description
- DispersionInvalid: 0x00000001
- IgnoreFutureRefTimeStamp:
0x00000002
- AutodetectWin2K: 0x80000000
- AutodetectWin2KStage2:
0x40000000

The default value for domain members


is 0x80000000. The default value for
stand-alone clients and servers is
0x80000000.
Entry determines whether the service
chooses synchronization partners
outside the domain of the computer.
The options and values are:

- None: 0
- PdcOnly: 1
CrossSiteSyncFlags All
- All: 2

This value is ignored if the NT5DS


value is not set. The default value for
domain members is 2. The default
value for stand-alone clients and
servers is 2.
Entry specifies the location of the DLL
for the time provider.

DllName All The default location for this DLL on


both domain members and stand-alone
clients and servers is
%windir%\System32\W32Time.dll.
Entry indicates if the NtpClient
provider is enabled in the current Time
Service.

 Yes 1
Enabled All
 No 0

The default value on domain members


is 1. The default value on stand-alone
clients and servers is 1.
Entry specifies the events logged by the
Windows Time service.
EventLogFlags All
 0x1 reachability changes
 0x2 large sample skew (This is
applicable to Windows Server
Registry Entry Version Description
2003, Windows Server 2003
R2, Windows Server 2008 , and
Windows Server 2008 R2 only)

The default value on domain members


is 0x1. The default value on stand-alone
clients and servers is 0x1.
Entry indicates whether to enable the
NtpClient as an InputProvider, which
obtains time information from the
NtpServer. The NtpServer is a time
server that responds to client time
requests on the network by returning
time samples that are useful for
InputProvider All
synchronizing the local clock.

 Yes = 1
 No = 0

Default value for both domain members


and stand-alone clients: 1
Entry specifies the large sample skew
for logging in seconds. To comply with
Security and Exchange Commission
(SEC) specifications, this should be set
to three seconds. Events will be logged
LargeSampleSkew All for this setting only when
EventLogFlags is explicitly configured
for 0x2 large sample skew. The default
value on domain members is 3. The
default value on stand-alone clients and
servers is 3.
Entry specifies the maximum number
of times to double the wait interval
when repeated attempts to locate a peer
to synchronize with fail. A value of
ResolvePeerBackOffMaxTimes All zero means that the wait interval is
always the minimum. The default value
on domain members is 7. The default
value on stand-alone clients and servers
is 7.
Entry specifies the initial interval to
wait, in minutes, before attempting to
locate a peer to synchronize with. The
ResolvePeerBackoffMinutes All
default value on domain members is 15.
The default value on stand-alone clients
and servers is 15.
SpecialPollInterval All Entry specifies the special poll interval
Registry Entry Version Description
in seconds for manual peers. When the
SpecialInterval 0x1 flag is enabled,
W32Time uses this poll interval instead
of a poll interval determine by the
operating system. The default value on
domain members is 3,600. The default
value on stand-alone clients and servers
is 604,800.

New for build 1702, SpecialPollInterval


is contained by the MinPollInterval and
MaxPollInterval Config registry values.
Entry is maintained by W32Time. It
contains reserved data that is used by
the Windows operating system. It
specifies the time in seconds before
W32Time will resynchronize after the
SpecialPollTimeRemaining All
computer has restarted. Any changes to
this setting can cause unpredictable
results. The default value on both
domain members and on stand-alone
clients and servers is left blank.

HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServe
r

Registry Entry Version Description


Entry indicates that non-standard mode
combinations are allowed in
synchronization between clients and
AllowNonstandardModeCombinations All
servers. The default value for domain
members is 1. The default value for
stand-alone clients and servers is 1.
Entry specifies the location of the DLL
for the time provider.

DllName All The default location for this DLL on


both domain members and stand-alone
clients and servers is
%windir%\System32\W32Time.dll.
Entry indicates if the NtpServer
provider is enabled in the current Time
Service.
Enabled All
 Yes 1
 No 0
Registry Entry Version Description
The default value on domain members
is 1. The default value on stand-alone
clients and servers is 1.
Entry indicates whether to enable the
NtpClient as an InputProvider, which
obtains time information from the
NtpServer. The NtpServer is a time
server that responds to client time
requests on the network by returning
time samples that are useful for
InputProvider All
synchronizing the local clock.

 Yes = 1
 No = 0

Default value for both domain members


and stand-alone clients: 1

MaxAllowedPhaseOffset information

In order for W32Time to set the computer clock gradually, the offset must be less than
the MaxAllowedPhaseOffset value and satisfy the following equation at the same time:

 Windows Server 2016 and later versions:

 |CurrentTimeOffset| / (16*PhaseCorrectRate*pollIntervalInSeconds)
<= SystemClockRate / 2
 Windows Server 2012 R2 and earlier versions:
 |CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) <=
SystemClockRate / 2

The CurrentTimeOffset value is measured in clock ticks, where 1ms = 10,000 clock
ticks on a Windows system.

SystemClockRate and PhaseCorrectRate are also measured in clock ticks. To get the
SystemClockRate value, you can use the following command and convert it from
seconds to clock ticks by using the formula of seconds*1000*10000:

W32tm /query /status /verbose


ClockRate: 0.0156000s

SystemclockRate is the rate of the clock on the system. Using 156000 seconds as an
example, the SystemclockRate value would be = 0.0156000 * 1000 * 10000 = 156000
clock ticks.

MaxAllowedPhaseOffset is also in seconds. To convert it to clock ticks, multiply


MaxAllowedPhaseOffset*1000*10000.
The following examples show how to apply these calculations when you use Windows
Server 2012 R2 or an earlier version.

Example 1: Time differs by 4 minutes (for example, your time is 11:05 and the time
sample that you received from a peer and believe to be correct is 11:09).

phasecorrectRate = 1

UpdateInterval = 30000 (clock ticks)

systemclockRate = 156000 (clock ticks)

MaxAllowedPhaseOffset = 10min = 600 seconds =


600*1000\*10000=6000000000 clock ticks

|currentTimeOffset| = 4mins = 4*60\*1000\*10000 = 2400000000 ticks

Is CurrentTimeOffset <= MaxAllowedPhaseOffset?

2400000000 <= 6000000000 = TRUE

AND does it satisfy the above equation?

(|CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) <=


SystemClockRate / 2)

Is 2,400,000,000 / (30000*1) <= 156000/2

Is 80,000 <= 78,000

NO/FALSE

Therefore W32tm would set the clock back immediately.

Note

In this case, if you want to set the clock back slowly, you would also have to adjust the
values of PhaseCorrectRate or updateInterval in the registry to make sure that the
equation result is TRUE.

Example 2: Time differs by 3 minutes.

phasecorrectRate = 1

UpdateInterval = 30000 (clock ticks)

systemclockRate = 156000 (clock ticks)

MaxAllowedPhaseOffset = 10min = 600 seconds =


600*1000\*10000=6000000000 clock ticks

currentTimeOffset = 3mins = 3*60\*1000\*10000 = 1800000000 clock ticks

Is CurrentTimeOffset <= MaxAllowedPhaseOffset?

1800000000 <= 6000000000 = TRUE


AND does it satisfy the above equation?

(|CurrentTimeOffset| / (PhaseCorrectRate*UpdateInterval) <=


SystemClockRate / 2)

Is 3 mins (1,800,000,000) / (30000*1) <= 156000/2

Is 60,000 <= 78,000

YES/TRUE

In this case the clock will be set back slowly.

Windows Time Service Group Policy Settings


You can configure most W32Time parameters by using the Group Policy Object Editor.
This includes configuring a computer to be an NTPServer or NTPClient, configuring
the time synchronization mechanism, and configuring a computer to be a reliable time
source.

Note

Group Policy settings for the Windows Time service can be configured on Windows
Server 2003, Windows Server 2003 R2, Windows Server 2008 , and Windows Server
2008 R2 domain controllers and can be applied only to computers running Windows
Server 2003, Windows Server 2003 R2, Windows Server 2008 , and Windows Server
2008 R2 .

You can find the Group Policy settings used to configure W32Time in the Group Policy
Object Editor snap-in in the following locations:

 Computer Configuration\Administrative Templates\System\Windows Time


Service

Configure Global Configuration Settings here.

 Computer Configuration\Administrative Templates\System\Windows Time


Service\Time Providers

Configure Windows NTP Client settings here.

Enable Windows NTP Client here.

Enable Windows NTP Server here.

Warning

Some of the preset values that are configured in the System Administrative template file
(System.adm) for the Group Policy object (GPO) settings are different from the
corresponding default registry entries. If you plan to use a GPO to configure any
Windows Time setting, be sure that you review Preset values for the Windows Time
service Group Policy settings are different from the corresponding Windows Time
service registry entries in Windows Server 2003. This issue applies to Windows Server
2008 R2 , Windows Server 2008 , Windows Server 2003 R2, and Windows Server
2003.

The following table lists the global Group Policy settings that are associated with the
Windows Time service and the pre-set value associated with each setting. For more
information about each setting, see the corresponding registry entries in Windows Time
Service Registry Entries earlier in this subject. The following settings are contained in a
single GPO called Global Configuration Settings.

Global Group Policy Settings Associated with Windows Time

Group Policy Setting Pre-Set Value


AnnounceFlags 10
EventLogFlags 2
FrequencyCorrectRate 4
HoldPeriod 5
LargePhaseOffset 1280000
LocalClockDispersion 10
MaxAllowedPhaseOffset 300
MaxNegPhaseCorrection 54,000 (15 hours)
MaxPollInterval 15
MaxPosPhaseCorrection 54,000 (15 hours)
MinPollInterval 10
PhaseCorrectRate 7
PollAdjustFactor 5
SpikeWatchPeriod 90
UpdateInterval 100

The following table lists the available settings for the Configure Windows NTP Client
GPO and the pre-set values that are associated with the Windows Time service. For
more information about each setting, see the corresponding registry entries in Windows
Time Service Registry Entries earlier in this subject.

NTP Client Group Policy Settings Associated with Windows Time

Group Policy Setting Default Value


NtpServer time.windows.com,0x1
Default options:

- NTP. Use on computers that are not joined to a


Type
domain.
- NT5DS. Use on computers that are joined to a
domain.
CrossSiteSyncFlags 2
Group Policy Setting Default Value
ResolvePeerBackoffMinutes 15
ResolvePeerBackoffMaxTimes 7
SpecialPollInterval 3600
EventLogFlags 0

Network Ports Used by the Windows Time Service


Windows Time follows the NTP specification, which requires the use of UDP port 123
for all time synchronization communication. This port is reserved by Windows Time
and remains reserved at all times. Whenever the computer synchronizes its clock or
provides time to another computer, that communication is performed on UDP port 123.

Note

If you have a computer with multiple network adapters (also called a multihomed
computer), you cannot selectively enable the Windows Time service based on the
network adapter.

You might also like