Click here to Skip to main content
15,503,822 members
Articles / Programming Languages / C++
Posted 6 Jan 2004


29 bookmarked

How to Synchronise Your Windows 2000 Machine using SNTP

Rate me:
Please Sign up or sign in to vote.
4.74/5 (29 votes)
6 Jan 2004CPOL2 min read
Using the Windows 2000 Time Service to set the system clock


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).


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 /

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.


  • January 7, 2004 - Initial version


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
United States United States
I've been programming for 35 years - started in machine language on the National Semiconductor SC/MP chip, moved via the 8080 to the Z80 - graduated through HP Rocky Mountain Basic and HPL - then to C and C++ and now C#.

I used (30 or so years ago when I worked for Hewlett Packard) to repair HP Oscilloscopes and Spectrum Analysers - for a while there I was the one repairing DC to daylight SpecAns in the Asia Pacific area.

Afterward I was the fourth team member added to the Australia Post EPOS project at Unisys Australia. We grew to become an A$400 million project. I wrote a few device drivers for the project under Microsoft OS/2 v 1.3 - did hardware qualification and was part of the rollout team dealing directly with the customer.

Born and bred in Melbourne Australia, now living in Scottsdale Arizona USA, became a US Citizen on September 29th, 2006.

I work for a medical insurance broker, learning how to create ASP.NET websites in VB.Net and C#. It's all good.

Oh, I'm also a Kentucky Colonel.

Comments and Discussions

GeneralThanks! Pin
Anonymous1-Oct-04 7:39
Anonymous1-Oct-04 7:39 
GeneralSync SNTP time once only Pin
mcpata200220-Jun-04 18:12
mcpata200220-Jun-04 18:12 
GeneralWin 2000 time Pin
Gordon Moore14-Jan-04 7:21
Gordon Moore14-Jan-04 7:21 
GeneralRe: Win 2000 time Pin
Rob Manderson20-Jan-04 0:07
protectorRob Manderson20-Jan-04 0:07 
Generalgood find Pin
Vadim Tabakman7-Jan-04 13:26
Vadim Tabakman7-Jan-04 13:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.