Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

How to Synchronise Your Windows 2000 Machine using SNTP

0.00/5 (No votes)
6 Jan 2004 1  
Using the Windows 2000 Time Service to set the system clock

Introduction

I used to run Atomic clock to keep my system time accurate. But after the last rebuild of this computer, I didn't want to reinstall it. So I did a bit of poking around in MSDN and found the steps needed to let Windows 2000 synchronise itself to an internet time source using a service that's shipped as part of the operating system.

There's nothing earth-shattering in this little article - everything I present can be found in MSDN but I thought I'd write it up to save someone else the time needed to track it all down.

The primary source of information I used is the MicroSoft Knowledgebase article Q223184. (Clickety not provided because the URLs sometimes change).

Environment This Article Refers To

I've only tested this on Windows 2000 Professional, Service Pack 4.

Using the Windows 2000 Time Service

First, you need to modify the following registry keys (or download the registry script at the top of this article and merge it into your registry).

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters]
"LocalNTP"=dword:00000000
"Period"="SpecialSkew"
"NtpServer"="india.colorado.edu"
"NTP"="NTP"
"Type"="NTP"

The LocalNTP entry determines whether this machine, having been synchronised to an external source, will act as an NTP server for your local network.

The Period entry determines how often your machine synchronises to an external time source. SpecialSkew is the default value which occurs once every 45 minutes until 3 good synchronizations occur, then once every 8 hours (3 per day).

The NtpServer entry can be either an IP address or a URL. In either case, it should refer to a machine running the SNTP protocol. You'll see here that I'm using a server at what I presume is Colorado University. I got the server name by doing a search on Google looking for public SNTP servers. There are hundreds of such servers out there. As an aside, in general the providers of public servers request that each site synchronise only one or two machines via the external server and synchronise other machines at the site from those one or two externally synchronised machines.

You can also set the NtpServer entry from a command prompt by executing the following command:

net time /setsntp:india.colorado.edu

You can query the current NtpServer setting by executing this command:

net time /querysntp

which will display the current server name (or IP).

The Type entry is used to specify whether the time service synchronises to the domain controller, to an external source, or doesn't synchronise at all.

Once you've set the registry entries, you need to set the time service to run automatically upon boot. The service is called Windows Time in the services applet. On Windows 2000 Professional systems, the service is installed but set to manual start. Set your clock to some wildly wrong value, start the service and the clock should change to indicate the machine is now synchronised to the external time source you specified.

That's It

I hope this little article comes in useful for someone out there.

History

  • January 7, 2004 - Initial version

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here