By default, Windows Vista synchronizes once every 7 days with time.windows.com along with every other user out there.

Let's change this to sync every half day with several NTP servers to get a more reliable time.

First of all go to the NTP Pool Project and browse to the page of your country, I'll use the Belgium NTP Pool as an example.

Let's start with the simple change and click on your system clock and select change date and time settings...

On the tab Internet Time select Change settings... and as a server, enter the name of your country's main pool, be.pool.ntp.org for Belgium. Press Update now to test it, and finally close all windows again.

At this point you're randomly picking an NTP server in your country for your weekly update. Let's improve this a bit by adding multiple servers.

Open an administrative command prompt and enter the following command (replace the server names by the list of your country, space separated, surrounded by double quotes):

 
net time /setsntp:"0.be.pool.ntp.org 1.be.pool.ntp.org 2.be.pool.ntp.org 3.be.pool.ntp.org"
w32tm /query /peers
net stop w32time
net start w32time
w32tm /resync
w32tm /query /peers

You will have noticed there are now four NTP servers in the list.

 
C:\>w32tm /query /peers
#Peers: 4

Peer: 0.be.pool.ntp.org
State: Active
Time Remaining: 595.8760000s
Mode: 3 (Client)
Stratum: 3 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 10 (1024s)
HostPoll Interval: 10 (1024s)

Peer: 1.be.pool.ntp.org
State: Active
Time Remaining: 595.8760000s
Mode: 3 (Client)
Stratum: 2 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 10 (1024s)
HostPoll Interval: 10 (1024s)

Peer: 2.be.pool.ntp.org
State: Active
Time Remaining: 595.8760000s
Mode: 3 (Client)
Stratum: 2 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 10 (1024s)
HostPoll Interval: 10 (1024s)

Peer: 3.be.pool.ntp.org
State: Active
Time Remaining: 595.8760000s
Mode: 3 (Client)
Stratum: 2 (secondary reference - syncd by (S)NTP)
PeerPoll Interval: 10 (1024s)
HostPoll Interval: 10 (1024s)

When you run w32tm /query /configuration you will notice the SpecialPollInterval setting will list 604800, which is 7 days in seconds.

To change the interval, open up regedit, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient and locate the SpecialPollInterval DWORD value.

Change this to Decimal 43200 (Hex 0000a8c0), which is equal to 12 hours in seconds.

Close regedit and execute the following commands:

 
net stop w32time
net start w32time
w32tm /query /configuration

This will now return a lot information, including the following lines:

 
SpecialPollInterval: 43200 (Local)
Type: NTP (Local)
NtpServer: 0.be.pool.ntp.org 1.be.pool.ntp.org 2.be.pool.ntp.org 3.be.pool.ntp.org (Local)

Congratulations, at this point you are succesfully syncing your computer every 12 hours against multiple NTP servers.

I've done this as a result of my previous IPv6 tunnel article, to make sure I'm running nearly equal with SixXS, which you can check at SixXS Time Check.

Update: Windows 7 deprecated net time /setsntp, use this instead:

 
w32tm /config /manualpeerlist:"0.be.pool.ntp.org 1.be.pool.ntp.org 2.be.pool.ntp.org 3.be.pool.ntp.org"
 
Comments: 4
 
  • Jeff

    Thanks for the article. One note, when using a list of servers with w32tm and the /manualpeerlist switch, the switch must be enclosed in quotes. The correction to your Windows 7 command would be:

    w32tm /config "/manualpeerlist:0.be.pool.ntp.org 1.be.pool.ntp.org 2.be.pool.ntp.org 3.be.pool.ntp.org"

    -Jeff

     
     
  • gn

    On Windows 7 Ultimate x64 I have following problem:

    C:\>net start w32time
    The Windows Time service is starting.
    The Windows Time service was started successfully.

    C:\>w32tm /config /manualpeerlist:"0.jp.pool.ntp.org 1.jp.pool.ntp.org 2.jp.pool.ntp.org 3.jp.pool.ntp.org"
    The command completed successfully.

    C:\>w32tm /query /peers
    The following error occurred: The specified module could not be found. (0x8007007E)

    C:\>w32tm /query /status
    The following error occurred: The specified module could not be found. (0x8007007E)

    C:\>w32tm /query /configuration
    The following error occurred: The specified module could not be found. (0x8007007E)

    C:\>w32tm /resync
    The following error occurred: The specified module could not be found. (0x8007007E)

    Any thoughts? ":)"

     
     
  • Thanks for this was killing me to find the time tab missing from Vista and doing it by cmd line helped much!

     
     
  • tOnIp

    It's also necessary the option /syncfromflags:MANUAL to force the use of the manual peer list.

     
     
  • Leave a reply
    Items marked with * are required. (Name, Email, Comment)
    Comment is missing some required fields.
     
     
     
    To make sure you are not a computer, please type in the characters you see.