home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
nisttime.carsoncity.k12.mi.us
/
nisttime.carsoncity.k12.mi.us.tar
/
nisttime.carsoncity.k12.mi.us
/
pub
/
daytime
/
nistimew.doc
< prev
next >
Wrap
Text File
|
2001-02-23
|
10KB
|
214 lines
Programs NISTIMEW and NISTIME-32bit
These programs will connect to one of the time servers operated by the
National Institute of Standards and Technology (NIST), and will compare the
time of the clock in your computer with the atomic time-scale operated by
NIST. The program will display the time difference and will offer you the
option of adjusting your clock by the displayed amount.
Both of these programs are designed to run in a Windows environment.
Program NISTIMEW is a 16-bit version that is suitable for Windows 3.1 or
Windows 95/98 (see additional comments below). Program NISTIME-32bit is a
32-bit version of the same program that is primarily intended for Windows NT
or Windows 95/98/2000/Me. All of the versions are likely to run in any
version of Windows, but there may be some problems if the 32-bit version is
run in Windows 3.1 (even if Win32S is installed) and the 16-bit version cannot
set the clock on a Windows NT system (even if it is run with system
privileges). In addition, the 16-bit version may not run in some versions
of Win 9x because the network interface supports only 32-bit applications.
We would recommend using the 16-bit version in Windows 3.1 and some early
versions of Win 9x. It is smaller than the 32-bit version, and this advantage
is likely to be most important on smaller systems. It offers most of the
the same capabilities as the 32-bit program. Change to the 32-bit program
if you get network errors when using the 16-bit program in a Win 9x environment.
(The errors may be "protocol not supported" or "invalid parameter in
network call"). Use the 32-bit program for most later versions of Win 98,
and for Win 2000 and Me.
The programs are compiled with a default list of server names and ip
addresses. You may update this list at any time using the menu option
File | Update server list
This will copy the file nist-srv.lst from the NIST archive to your system.
The file will be stored in the system directory (usually c:\windows or
c:\winnt). This file contains a list of all of the time servers operated
by NIST. It is a simple text file which you may examine or print using
the standard utilities. The program checks for the existence of this
file each time it starts, and uses the contents to set the server menu
options. You may edit this file provided you preserve its format; the
program will probably malfunction if you change the format of the
entries. See the comments in the file for more information.
You can also use this file to support communicating with our systems
through a proxy server. See README.PROXY in this directory for more
information about doing this.
1. NISTIMEW
You can configure the program to run in any time zone and with or
without the adjustment for daylight saving time enabled. These parameters
will be set automatically from your user environment as defined by the
control-panel settings, and you should check to be sure that these are
correct before starting the program. In Windows 95/98, for example, you can
examine or change these settings using
Start | Settings | Control Panel | Date/Time | Time Zone
They can also be configured from inside the program using the menus; changing
either the time zone or the daylight saving time flag using the menus will
override the values defined by the system environment, but this is not
recommended under normal circumstances -- the change is only local to the
program and will not be propagated to the rest of the system.
The program is designed to run on any configuration that supports
Windows (v3.1 or later) and using a network interface that is compatible with
the Winsock standard (v1.1 or later). It will probably run in any 32-bit
environment but will be unable to set the clock on a Windows NT system.
However, it is not compatible with the network interface supplied with
most versions of Windows after Win 98.
If you are using MSDOS or Windows 3.1, and if you have software that runs
in this environment and which depends on the definition of the local time zone,
then it may be useful to define the environment variable TZ if you have
not already done so. This will provide a system-wide definition of the time-
zone and whether or not your system should be adjusted for daylight saving
time if necessary. The syntax of the definition statement is:
SET TZ= XXXyZZZ
where:
XXX is the 3-character name of your time zone: EST for Eastern
Standard Time, etc.
y is the offset of your standard time from UTC (Greenwich Time) in
hours, measured West from Greenwich. This value can have a negative
sign if necessary but will be positive for all US locations.
ZZZ is the 3-character name of your daylight time if you observe
daylight saving time; otherwise it is blank.
Thus:
SET TZ = EST5EDT Eastern Time, daylight saving on
SET TZ = CST6 Central time, daylight saving off
SET TZ = MST7MDT Mountain time, daylight saving on
etc.
You can add this statement to your AUTOEXEC.BAT file so that TZ is defined
automatically when your system starts. This procedure is not necessary
for Windows 95 or Windows NT since these system provide the same adjustment
from the control panel. They are also optional for Windows 3.1 -- the
same functionality can be achieved using the menu selections inside of
the program.
Note that turning daylight saving time on simply enables the correction
for the Summer months -- it is never applied during the Winter months no
matter how you set this switch. The boundaries between Summer and Winter are
based on the US transitions dates of the first Sunday in April and the last
one in October.
2. NISTIME-32bit
This program reads both the time zone offset and the daylight saving time
flag from the system, and these choices cannot be changed by the program.
Apart from this difference, the two versions are almost the same from the
user point of view.
Since this version gets the time zone offset and the daylight saving
time flag from the system, it is important that these parameters be set
correctly. You can set or check these settings using
Start | Settings | Control Panel | Date/Time | Time Zone
and you should be sure that these settings are correct before you run
the program.
Although this program will probably run in a 16-bit Windows environment
if win32s is installed, it may not work properly in that environment.
Among other difficulties, the program may not be able to determine the local
time zone offset and may do erratic things as a result.
Using either version, the overall uncertainty in the time comparison
should be no worse than +/- 0.5 seconds under all circumstances, and will be
substantially less than this value in most cases.
Installation of either version
The program files are named nistimew.exe and nistime-32bit.exe. These
are the only files that are needed initially. Either one can be copied to
any directory on your system.
In Windows 3.1 You can run either version by selecting the Program Manager
command "Run ..." (on the File menu) and entering the command line:
<path>\<program name>
where <path> is the name of the directory where you have placed the .exe file.
If you have copied nistimew.exe to c:\time, for example, you would enter:
c:\time\nistimew
You can also install an icon for this program using the "New" option on the
program manager File menu. When you select this option, complete the command
line box with the path to the program file and its name. Using the example
above, you would fill in this box with the string:
c:\time\nistimew
The other boxes are optional; you may use them to add a text string to the
icon, etc. Once you have installed the program in this way, you can run it by
double-clicking on its icon in the usual way.
In Windows 95 or Windows NT, you can run the program using the command
Start | Run | <path>\<program name>
where <path> and <program name> are as above. You can also run the program
by double-clicking on its name in Windows explorer or by creating a short-
cut to it on your desk-top. To create the short-cut, hold down the left
mouse button and drag the program from the Windows explorer display to
your desktop.
If you add the word "Once" to the command line of either program (without the
quotes and using any mixture of upper- and lower-case letters), then the
program will query the NIST server once each time it is started, set your
clock (if necessary), and exit after the clock has been set. For example,
if the program is located in directory c:\time, you could use the command:
Start | Run | c:\time\nistimew once
If you have defined a desk-top short-cut to the program, you could also
add once to the short-cut. To do this, right-click on the short-cut, open
Properties | Short cut, add the word once to the target line and click OK.
This change affects the short-cut only; it will not have any effect if
the program is started in some other way.
Note that the "once" option is never added using the periodic query
dialog of the program. That dialog only accepts a numerical value that sets
the interval between multiple calibration cycles.
Each time the program is started, it will use the configuration you have
saved (if this file exists) or the default configuration if no previously
saved configuration can be found. Look at "HELP | Getting Started" for more
information.
For additional information, please consult the various help messages.
You may address questions or comments to:
Network Time Service
Time and Frequency Division
National Institute of Standards and Technology
325 Broadway
Boulder, Colorado 80303
e-mail: time@time.nist.gov
Software Version: 23 February 2001