NTPDATE.EXE is an NT (Intel) port of the ntpdate program which
comes as part of the xntp distribution.  NTPDATE will query one
or more NTP servers and set the local clock based on a statistical
interpolation of the 'real' time.

It is a very preliminary hack, as I don't currently have the time 
to follow through and clean it up (e.g. make it a service).  It 
has been tested against NTP servers (v1 and v3) and correctly sets the 
time.  The hacking was necessary primarily because of the timer/timing 
services available in the Win32 subsystem.  Timezone information 
was another problem, and I don't know what will happen when we get 
to daylight savings time.  I expect to revisit the code before then 
(as of this writing, I have about 5 months left!).

It is very simple to run.  The following command will set the time
and report the time difference.

	NTPDATE <server1> [<server2> [<server3>...]]

Servers may be specified by name or address.

Putting '-v' on the command line will cause it to print the
version information on the standard output.

Putting '-d' on the command line will cause it to print out
lots of debugging information, and will also prevent it from
setting the time.

You can tell ntpdate to communicate with older NTP protocols
using the '-o' switch.  For instance, to query a version 1 server
named abc, use the following command:  

	ntpdate -o 1 abc

I doubt any of the crypto functions work.

Other options may or may not work as a result of the hack.

Because I wasn't that familiar with the command-line options
during the port, I modified the routine that actual changes
the system time to print out the message 'Setting NT System Time!!!'
with a beep, so there's no doubt.  If it doesn't beep, it didn't
change the time.

Share and enjoy...

Todd Aven
avents@btco.com
5 December 1994
