SetTime FAQ File


What is SetTime and why do I need it?

If you're a student of Visual C++ looking for cogent examples of source code to help further your awareness of Visual C++, MFC and WinSock programming, SetTime can help. See the SetTime Home Page for the background and good luck with your studies!

However, the vast majority of those who download SetTime are simply interested in accurate time. Having a straightforward utility with which to correct the clock on ones PC to an extremely accurate time source seems to be the main raison d'être for SetTime. As such, this program should serve you well no matter what corner of the Internet you reside in.

What do I need to run SetTime?

  • Windows 9x/NT/2000/XP at a minimum, configured for Internet use.
  • A default Web browser associated with .htm files with which to browse SetTime's home/help pages..
  • Your Control Panel's Date/Time applet must be set up correctly for your timezone and Daylight Savings Time settings.

How do I install/uninstall SetTime?

Simply expand the SetTime.zip file into a directory of your choice. Ensure all files reside in the same directory, and SetTime will be able to find its custom font file.

To remove SetTime from your system, just delete the SetTime.exe and its font file from the directory you placed them in. Optionally, remove the SetTime registry key that's documented on the SetTime Revision History.

I've installed SetTime. What now?

Nothing could be simpler! Just run the program. If you've created a desktop shortcut to SetTime, ensure the Working Directory on the shortcut is the same as where all the SetTime files reside.

SetTime will then present you with a screen similar to this, except that the bottom status line will be blank. Click the button labeled 'Query Current Timebase' to query the current time from the default timebase which is a machine called tick.usno.navy.mil at the US Naval Observatory in Washington, DC, USA.

As shown, the timebase will respond with an exact time value. SetTime will compare the difference between your local clock and the value returned from the timebase, displaying the difference (or Delta) on the status bar.

At this point, simply click the second button on the SetTime screen labeled 'Correct System Clock' to get a fresh sample and use it to reset your local system clock.

When I query the timebase, I get a Delta of thousands of seconds and an error dialogue that looks like this:

This error is common for new users of SetTime and indicates that your Win95 or NT timezone settings are not set up correctly. Specifically,

By design, SetTime performs no timezone calculations, instead relying on the operating system to report the current system clock in GMT adjusted format. This means you must ensure your Control Panel's Date/Time applet accurately reflects both your timezone and your Daylight Savings Time settings. If you haven't done this step at some time in the past, it's likely you're running with Pacific Standard Time as your timezone (Microsoft's Headquarters is in PST).

Lastly, the Maximum Delta Warning dialogue could appear simply because your system clock is more than 30 minutes off. Using SetTime to correct your clock should permanently remove this message from appearing, although I've seen systems whose clocks are so jive that they lose or gain more than 30 minutes a day regularly.

How do I use SetTime behind a firewall?

SetTime uses TCP/IP port 37 (for RFC868 Time Protocol) or port 123 (for RFC2030 Simple Network Time Protocol - SNTP) so have your firewall manager either open one or both of these ports outright, or if s/he's really a stickler, explicitly map one or both of these ports directly to your preferred timebase. SetTime has successfully operated with WinGate 2.0 in this mode, for example.

Will SetTime work within an Intranet?

If your network manager is operating a Time Protocol or NTP time server on a computer within your Intranet, then just define that computer's IP address or DNS name into SetTime via the Alternate Timebase menu option. Also, as most large Cisco routers are capable of supplying an NTP chime to their subnets, this may well be an option on your Intranet.

Can SetTime go into my Startup Folder?

To have SetTime simply run, correct the clock and exit, just put some text on the command line. Anything at all will do. I have a shortcut in my Startup folder which has, on the Target field, the text:    c:\Program Files\SetTime.exe /Run_once_and_exit_already

Why won't WordPad and/or Notepad display the SetTime.cpp source correctly?

To display the SetTime.cpp source file with all the tab stops correctly aligned, either limit your editing/printing to the Visual C++ editor, or try the excellent shareware program TextPad (www.textpad.com) which handles everything properly.