Sync Your Server 2003 Time

   May 13th, 2009

For nearly all servers you don’t really need to worry about configuring this since most servers can keep their time by themselves.

But every once in a while you run in to one of those black sheep servers that seems to lose time every time you turn around.  The particularly annoying thing is that if the server’s time is incorrect, all computers attached to that domain will be incorrect.  This can make troubleshooting difficult if you’re going off of times in logs, and log times are completely wrong.  I ran across such a server today.  I KNOW I have set this server’s time in the past and it seems every time I get back around to checking it, it’s is out of sync by 10, 15, 30 minutes, or even more then an hour!

So after digging around and trying a couple different things, I came across some instructions and a handy utility that got the server’s time sync’ing to the NTP’s time servers reguarlarly to ensure the server never loses time again, which I’ll share with you.

First off, I’ll point you to a program called Atomic Clock Sync.  I like it because it takes away some of the nastyness of dealing with the Windows Time service.  I say some because we’re still going to have to dive in to the registry in the next part where we will actually set up the NTP server settings for the Windows Time service:

1. Change Windows to use the NTP protocol for time synchronization:
Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
Value: Type
Data: NTP

2. Configure the AnnounceFlags value:
Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config
Value: AnnounceFlags
Data: 5

3. Enable the NTP server value:
Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
Value: Enabled
Data: 1

4. Specify the NTP server to use:
Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Parameters
Value: NtpServer

5. Select the NTP polling interval:
Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
Value: SpecialPollInterval
Data: 900

6. Configure the time correction settings:
Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config
Value: MaxPosPhaseCorrection
Radix: Decimal
Data: 3600

Key: HKLM\SYSTEM\CurrentControlSet\Services\W32Time\Config
Value: MaxNegPhaseCorrection
Radix: Decimal
Data: 3600

After this, stopping and restarting the NTP service should get you working.

You can easily do this with the handy Atomic Clock tool I linked above.

On the Repair Service tab, click Stop Service.  Then Start Service.  And finally, click Sync Time.

If all went according to plan you should see a message telling you that the time was synced!

That’s it.  Now your pesky Server 2003 box will keep sync with the NTP’s servers, so all of your workstations will stay in sync as well!

4 Responses to “Sync Your Server 2003 Time”

  1. Andrew  Says:

    Fantastic Nick,
    I spent some time today configuring NTPSync on my Untangle (LINUX)Server only to find that the issue was with the Domain controller which is all sorted now thanks to you

    Once again much appreciated Nick

  2. Nick - Author Comment:

    In addition, I have found when setting this up on some servers that the service fails to start with either a file not found error or some other silly crap.
    Using the Atomic Clock Sync utility I mentioned above, you should FIRST make sure the service will stop and start. If it does you can proceed above.
    If it doesn’t, you need to unregister and then register the service using the appropriate buttons BEFORE you make your registry changes. Otherwise they will get wiped out when you unregister and register and will have to go back and make them again.
    Happy syncing.

  3. Brian Pritt  Says:

    Great find! I’ve been fighting with time drift on one of my Win2k3 servers for days but this is the solution I’ve been looking for…many thanks!!!

  4. Nick - Author Comment:

    Glad it worked for you! Just keep an eye on it, because I had one server that would even revert my registry changes every once in a while. I think it was some software on the server causing it, but I never tracked it down as the server was decommissioned with in a few months and its replacement behaved properly.

Leave a Response


πWhat do you think you're doing?