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 / nistimep.man < prev    next >
Text File  |  1996-11-18  |  8KB  |  212 lines

  1. Name
  2.    nistimep.exe -- compare the time of the PC clock with the NIST 
  3.            internet time server. 
  4.            This version is for PCs which have a packet-driver
  5.            interface to the network.
  6.  
  7. Syntax
  8.    nistimep  [ options ]
  9.  
  10. Description
  11.    This program connects to the NIST internet time server named 
  12.    time_a.timefreq.bldrdoc.gov using tcp/ip port 13.  The time
  13.    server responds with a packet containing the time in a format
  14.    similar to that used by the NIST Automated Computer Time Service
  15.    (ACTS).  The received time is compared with the time of the local 
  16.    clock, and the difference may be used to correct the local DOS clock.
  17.    If the -C option is specified, the time of the CMOS battery clock 
  18.    can also be checked and set. 
  19.  
  20.    This version uses the wattcp software library to provide tcp/ip 
  21.    packets to a resident packet-driver.  The packet driver must be 
  22.    loaded and running before the nistimep program can be used.
  23.  
  24.  
  25.    The program may be called with the following options:
  26.  
  27.     (note that upper and lower case letters are distinct)
  28.  
  29.    -m0          Do not display the received time message.  The 
  30.         time difference between the DOS clock and NIST (in 
  31.         seconds) is written to the standard output.  A 
  32.         positive value for the difference means that the
  33.         the local clock is fast with respect to NIST.  The
  34.         -c option is ignored.
  35.  
  36.    -m1 or -M    Display short time messages.  This is the default
  37.         if the -m switch is not used.
  38.  
  39.    -m2          Display longer time messages including an explanation
  40.         of each parameter.
  41.  
  42.    -s0          Do not set the local clock.
  43.  
  44.    -s1 or -S    Set the local clock only if the server is healthy.
  45.  
  46.    -s2          Set the local clock even if the server is not healthy.
  47.  
  48.    -s3          Query operator before setting the clock.  This is the
  49.         default if the -s switch is not used.
  50.  
  51.    -c1 or -C    A CMOS battery clock is present.  Its time will be
  52.         compared against NIST.  If a time set is requested,
  53.         this clock will be set too.  This is the default
  54.         if the -c switch is not used.
  55.  
  56.    -c0          A CMOS battery clock is not present or the clock
  57.                 interface to the system is not standard.
  58.  
  59.  
  60. -z<val>         This switch specifies that the received time message in
  61.         UTC is to be corrected for the time-zone of the user.  If
  62.         the absolute value of <val> is less than 13, it represents
  63.         the time difference between the Universal Time (formerly
  64.         called GMT) and the user's time in hours, where positive
  65.         values mean that the user is West of Greenwich and negative
  66.         values are for locations East of Greenwich.  The US time
  67.         zones are therefore specified by:
  68.  
  69.         -z5        Eastern Time
  70.         -z6        Central Time
  71.         -z7        Mountain Time
  72.         -z8        Pacific Time
  73.             etc.
  74.         Universal Time (GMT) would be specified by:
  75.  
  76.         -z0
  77.  
  78.         and the time in Western Europe by:
  79.  
  80.         -z-1
  81.  
  82.         If the absolute value of <val> is greater than 12, then it
  83.         represents the time difference as above, but the units are
  84.         in minutes rather than hours so that zones whose time does
  85.         not differ by an integral number of hours can be specified
  86.         in this way.  The sign convention is the same as above.
  87.         Thus US Mountain Time could also be specified using:
  88.  
  89.         -z420
  90.  
  91.         If the switch is not present, then US Mountain Time
  92.         is assumed by default.
  93.  
  94. -d0        Do not correct time difference for Daylight Saving Time.
  95.  
  96. -d1 or -D    Correct for Daylight Saving Time using the 
  97.         US transition dates (Daylight Saving Time starts on the
  98.          first Sunday in April and ends on the last Sunday in
  99.         October).  
  100.  
  101.         If this switch is not present, then -d1 is assumed by
  102.         default.
  103.  
  104. Message Format
  105.  
  106.     The message received from NIST is shown below:
  107.  
  108.             D  L
  109.  MJD  YY MM DD HH MM SS ST S H  Adv.
  110. 49010 93-01-23 22:01:22 00 0 0  50.0 UTC(NIST) * 
  111.  
  112.  
  113. The heading is not part of the message and is shown only
  114. to identify the parameters.  The first number is the date 
  115. expressed as a Modified Julian Day number (MJD), and the next 
  116. 6 values give the Universal Coordinated date and time (formerly 
  117. called Greenwich Mean Time) as year, month, day, hour, minute and 
  118. second.
  119.  
  120.     The eighth number is the daylight saving time flag, DST.
  121. It is based on the continental US system, which has transitions on
  122. the first Sunday in April and the last Sunday in October.
  123.  
  124. DST =  0 means standard time is currently in effect.
  125. DST = 50 means daylight saving time is currently in effect.
  126. DST = 51 means the transition from standard time to daylight time is
  127.      at 2am local time today.
  128. DST =  1 means the transition from daylight time to standard time is
  129.      at 2am local time today.
  130.  
  131. DST > 51 gives advance notice of the number of days to the transition 
  132.      to daylight time.  The DST parameter is decremented at 0000 
  133.      every day during this advance notice period, and the transition
  134.      will occur when the parameter reaches 51 as discussed above.
  135.  
  136. 1 < DST < 50  gives advance notice of the number of days to the 
  137.           transition to standard time.  The DST parameter is 
  138.           decremented at 0000 every day during this advance 
  139.           notice period, and the transition will occur when the
  140.           parameter reaches 1 as discussed above.
  141.  
  142.     The DST parameter is used by this version of the program, if
  143. you have selected that the correction for Daylight Saving Time
  144. should be applied if necessary.
  145.  
  146.     The next number is the leap second flag, LS.
  147.  
  148. LS = 0 means no leap second is scheduled.
  149.  
  150. LS = 1 means that a leap second is to be added as 23:59:60 on the
  151.        last day of the current month.  The last minute will therefore
  152.        be 61 seconds long. Leap seconds are usually added at the end
  153.        of either June or December.
  154.  
  155. LS = 2 means that second 23:59:59 is to be dropped on the last day of 
  156.        the current month.  The second following 23:59:58 will be 00:00:00
  157.        of the next day.  This minute will therefore be 59 seconds 
  158.        long.  This situation is unlikely to be necessary in the
  159.        foreseeable future.
  160.  
  161.     Note that leap seconds are inserted or deleted at the specified
  162. Universal Times, while daylight savings transitions are always with
  163. respect to local time.  This version of the program does not use the LS
  164. parameter.
  165.     
  166.     The health parameter, H, gives the health of the server:
  167.  
  168. H = 0 means that the server is healthy.
  169.  
  170. H = 1 means that the server is operating properly but that its
  171.       time may be in error by up to 5 seconds. This state should
  172.       change to fully healthy within 10 minutes.
  173.  
  174. H = 2 means that the server is operating properly but that its
  175.       time is known to be wrong by more than 5 seconds.  
  176.  
  177. H = 3 means that the hardware or software have failed and that the
  178.       time error is unknown.
  179.  
  180.     The advance parameter, ADV, gives the time advance of the
  181. transmissions, in milliseconds.  Each time packet is sent out early
  182. by this amount to compensate (approximately) for the network delay.
  183.  
  184.     The remaining characters on the line identify the time 
  185. source and are included for compatibility with the ACTS time
  186. system.
  187.     
  188. Restrictions
  189.  
  190.     This program uses a packet driver to interface to 
  191.     the internet and this software must be running before
  192.     nistimep is called.
  193.  
  194. Bugs
  195.  
  196.     This version does not estimate the transmission delay 
  197.     in the network.  This is unlikely to be a limitation
  198.     since the DOS clock can only be set or read to +/- 55 msec
  199.     and the CMOS battery clock can only be read to the nearest
  200.     second.  
  201.  
  202. Files
  203.     nistimep.exe            Compiled and linked version of the program.
  204.     nistimep.man            This document.
  205.  
  206. See also:
  207.  
  208.     timeserver.info
  209.     read.me
  210.  
  211. Last Modified: 21 August 1993
  212.