With the introduction of Windows 2000, Microsoft adopted a time synchronization service – Windows Time. The service continued in Server 2003, right up to the latest Windows Server 2008 operating systems. The service is installed by default in the service list, the executable file is called w32time.exe and is stored in the windows/system32 directory.
This article provides information on how to:
- configure the Windows Time service.
- modifying associated registry settings.
- Using the registry editor.
- controlling the time service.
Warning: Changing registry settings incorrectly can cause problems. We therefore recommend that before changing any settings, you make a backup the registry. Backing up is achieved by using the ‘Export’ menu option in the registry editor, Regedit.exe, application. If any issues arise after changing any registry settings, the old settings can be re-established using the ‘Import’ menu option.
Configuring the Time Service
The Windows Time Service is configured by modifying registry settings. The registry is a database where Windows stores configuration settings and options. The registry editor, regedit, can be used to modify options and settings stored in the registry. Most application have an associated parameter list stored in the registry. For the Windows Time service, it’s associated options and parameters are stored at:
There are a number of options available, including, the ability to set a time server, change the period at which synchronization occurs and also allow the Windows server to act as a NTP server to clients.
The Windows Time Service key ‘NTPServer’ specifies a space-delimited list of NTP time servers that can be used for synchronization purposes. Either DNS addresses or IP address can be specified. Each time reference can optionally have a set of flags associated with it. The flags are specified after the DNS or IP address separated by a comma. A set of 4 flags are specified covering bits 0 to 3:
Bit 0: Special Interval, flag value 1 (0x01).
Bit 1: Use as fallback only, flag value 2 (0x02).
Bit 2: Symmetric Active, flag value 4 (0x04).
Bit 3: Client, flag value 8 (0x08).
The special interval flag instructs the time service to poll the associated time reference at the period specified by the special poll interval, described below. If left reset, the time service will select a poll interval based on the quality of the received samples. The flag ‘Use as fall-back only’, indicates that the associated time reference should only be used as a fall-back reference in event og failure of other specified references.
The NTP server key is located in the registry at:
To configure the time service to allow Windows to synchronize to an external time reference, modify the parameter ‘Type’. Set the registry parameter to ‘NTP’. This indicates synchronization to a NTP reference is required. The Type parameter is located in the registry at:
To change the period at which Windows attempts to synchronize with the NTP reference, modify the parameter ‘Special Poll Interval’. This specifies the synchronization period in seconds. The default is 604800 seconds, or 7 days. A generally accepted polling period of once every hour, or 3600 seconds, is reasonable.
The Special Poll Interval parameter is located in the registry at:
The Announce Flags parameter is a set of flags that specifies if the host computer is a time server or a reliable time server. In order to be classified as a reliable time server, it also needs to be classified as a time server. Therefore, to configure the computer as a reliable time server, set flag bits 1 and 3 – which equates to a value of 5. The Announce flags parameter is located in the registry at:
The ‘Enabled’ parameter allows the service to provide NTP synchronization to other time clients over a network. If enabled (set to 1), the service can be used to synchronize other NTP clients. The functionality can be disabled by setting this flag to 0. The Enabled parameter is located in the registry at:
Searching for Registry Keys
A useful feature of the registry editor application, regedit, is the search facility. A specific key can be searched for in the registry by using the Find option and entering the key name. The registry editor will then search the registry for all keys matching the entered key name.
Controlling the Windows Time Service
After modifying any of the time services associated registry settings, the service needs to be restarted for any changes to take effect. The service can restarted in one of two ways:
From the Services applet in the Windows control panel administrative tools.
From a DOS command prompt using ‘net stop w32time’ and then ‘net start w32time’.