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
/
nistimen.man
< prev
next >
Wrap
Text File
|
1996-11-18
|
7KB
|
193 lines
Name
nistimen.exe -- compare the time of the PC clock with the NIST
internet time server.
This version is for PCs which have the PC/TCP
Network software.
Syntax
nistimen [ options ]
Description
This program connects to the NIST internet time server named
time_a.timefreq.bldrdoc.gov using tcp/ip port 13. The time
server responds with a packet containing the time in a format
similar to that used by the NIST Automated Computer Time Service
(ACTS). The received time is compared with the time of the local
clock, and the difference may be used to correct the local DOS clock.
If the -c option is specified, the time of the CMOS battery clock
can also be checked and set.
This version requires the PC/TCP kernel to send and receive messages,
and this software must be present and running before the nistimen
program can be used.
The program may be called with the following options:
(note that upper and lower case letters are distinct)
-m0 Do not display the received time message. The
time difference between the DOS clock and NIST (in
seconds) is written to the standard output. A
positive value for the difference means that the
the local clock is fast with respect to NIST. The
-c option is ignored.
-m1 or -M Display short time messages.
-m2 Display longer time messages including an explanation
of each parameter.
-s0 Do not set the local clock.
-s1 or -S Set the local clock only if the server is healthy.
-s2 Set the local clock even if the server is not healthy.
-s3 Query operator before setting the clock.
-c or -C A CMOS battery clock is present. Its time will be
compared against NIST. If a time set is requested,
this clock will be set too.
If no options are used, the default is -M -s3: the program
displays short time messages and will ask you before setting the
clock. The local clock will not be adjusted if the measured time
difference is 0.
Message Format
The message received from NIST is shown below:
D L
MJD YY MM DD HH MM SS ST S H Adv.
49010 93-01-23 22:01:22 00 0 0 50.0 UTC(NIST) *
The heading is not part of the message and is shown only
to identify the parameters. The first number is the date
expressed as a Modified Julian Day number (MJD), and the next
6 values give the Universal Coordinated date and time (formerly
called Greenwich Mean Time) as year, month, day, hour, minute and
second.
The eighth number is the daylight saving time flag, DST.
It is based on the continental US system, which has transitions on
the first Sunday in April and the last Sunday in October.
DST = 0 means standard time is currently in effect.
DST = 50 means daylight saving time is currently in effect.
DST = 51 means the transition from standard time to daylight time is
at 2am local time today.
DST = 1 means the transition from daylight time to standard time is
at 2am local time today.
DST > 51 gives advance notice of the number of days to the transition
to daylight time. The DST parameter is decremented at 0000
every day during this advance notice period, and the transition
will occur when the parameter reaches 51 as discussed above.
1 < DST < 50 gives advance notice of the number of days to the
transition to standard time. The DST parameter is
decremented at 0000 every day during this advance
notice period, and the transition will occur when the
parameter reaches 1 as discussed above.
The DST parameter is not used by this version of the program,
which uses Universal Time and the locally defined time zone
parameter both to check the clock and to set it if necessary
(see the installation information below).
The next number is the leap second flag, LS.
LS = 0 means no leap second is scheduled.
LS = 1 means that a leap second is to be added as 23:59:60 on the
last day of the current month. The last minute will therefore
be 61 seconds long. Leap seconds are usually added at the end
of either June or December.
LS = 2 means that second 23:59:59 is to be dropped on the last day of
the current month. The second following 23:59:58 will be 00:00:00
of the next day. This minute will therefore be 59 seconds
long. This situation is unlikely to be necessary in the
foreseeable future.
Note that leap seconds are inserted or deleted at the specified
Universal Times, while daylight savings transitions are always with
respect to local time.
The health parameter, H, gives the health of the server:
H = 0 means that the server is healthy.
H = 1 means that the server is operating properly but that its
time may be in error by up to 5 seconds. This state should
change to fully healthy within 10 minutes.
H = 2 means that the server is operating properly but that its
time is known to be wrong by more than 5 seconds.
H = 3 means that the hardware or software have failed and that the
time error is unknown.
The advance parameter, ADV, gives the time advance of the
transmissions, in milliseconds. Each time packet is sent out early
by this amount to compensate (approximately) for the network delay.
The remaining characters on the line identify the time
source and are included for compatibility with the ACTS time
system.
Installation
The program may be installed in any directory and may be
run either by a keyboard command or from a batch file.
This program uses an environmental parameter named TZ
(for time-zone) to convert from the universal time received
from NIST to the local time of the user. You must set this
parameter in your environment, and this easiest way to do
this is to add a line to your autoexec.bat file so that TZ
is set whenver the computer is started. Here are some
examples of how to do this:
If your time zone is -- use this line --
Eastern time with daylight saving time: set TZ = est5edt
Central time with daylight saving time: set TZ = cst6cdt
Mountain time with daylight saving time: set TZ = mst7mdt
Pacific time with daylight saving time: set TZ = pst8pdt
etc.
In each case, the first 3 letters are the abbreviation for
the local time zone, the digit specifies the number of
hours to subtract from universal time to get local standard
time, and the last three letters specify that daylight
saving time is observed using the standard US model. If
your area does not follow daylight saving time, then you
should omit the last three letters. For example:
Mountain time without daylight saving time: set TZ = mst7
Restrictions
This program uses the PC/TCP kernel to interface to
the internet and this software must be running before
nistimen is called.
Bugs
This version does not estimate the transmission delay
in the network. This is unlikely to be a limitation
since the DOS clock can only be set or read to +/- 55 msec
and the CMOS battery clock can only be read to the nearest
second.
Files
nistimen.exe Compiled and linked version of the program.
nistimen.man This document.
Last Modified: 2 June 1993