NTPDATE.EXE Summary =================== This is an Intel binary that runs on Windows NT 3.1, 3.5, and Windows95. It sets the time by querying NTP or XNTP servers on the network using IP as the network transport. Information Update 950130 ========================= The routines used to retrieve and set time were inconsistent with respect to timezone. I have corrected it so that GMT is the basis for all time calculations. This means that if you correctly set your timezone information using the Control Panel applet, NTPDATE should now work properly for you. This version has been tested in several different timezones with good success. HOWEVER! The C runtime library routines for getting the time also take cues from the 'TZ' environment variable, whereas the Win32 API for setting the system time does not. This means that if you set the 'TZ' environment variable, NTPDATE is not likely to set your time properly. I will attempt to fix this next time I get some spare time. I have removed the BEEP when NTPDATE sets the time. Base Information 941205 ======================= 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 [ [...]] 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