Atomic2.0.5.Doc

Program: Atomic.rexx
Version: 2.0.5
Author:  John Chufar
Email:   chufarj@telepath.com
Date:    24 Feb 1999

References: AmigaOS3.1, AREXX, WorkBench, and AmigaDOS Manuals


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SUPPORT - Web:    "AMIGA ATOMIC CLOCK WEB PAGE"
                  www.telepath.com/chufarj/atomic.html
          Email:  mailto:chufarj@telepath.com


BUG FIX ES(From 2.0.4 to 2.0.5)

- During day of DST to STANDARD change (or vice-versa) the timeserver still
indicated DST, whereas, at 0200 local the time should have been changed to
STANDARD
- Using 2.0.4, te time would not be changed unitl the day after
(at the time the timeserver changes it's DST field)



SOFTWARE CHANGES

-15 new lines of code

QUICK START - for experienced users only

- Install using installscript


How does iT work?

The atomic.conf file contains a list of 9 "Stratum 1" servers.  The program
will look at each server and review your atomic.log file for the history of
each server and calculate the average for each.

The first instance will start creating a log file "s:atomic.log" and will
date-time stamp your connection (or lack of a connection with questionalbe
date-time since the EXACT Atomic Time could not yet be loaded).  Each
subsequent connection adds to the log file which is analyzed EVERY time you
execute atomic.rexx.

If a server cannot connect, the default configuration provides for 8 other
servers which will each be tried, so there should NEVER be a time when you
cannot get the time. This is redundancy with a multiple of 9!!!

They will be tried in the order of their connection history starting from
the "quickest" to the "slowest".


- Logging

Each event is now logged in the format as follows:

LOGFILE=s:atomic.log


Server          CTime(1)    Date         Actual Time  DiffTime(2)
nist1.datum.com   0.38   24 Feb 1999   14:56:54     0 days 00:00:10

(1) Where CTime is the Connection Time in SECONDS.

(2) DiffTime is time difference for that connection (if successful)

Can you edit the log file????  Yes, but doing so will be playing with the
statistics of your connection to the Internet.  If you feel a timeout, which
takes about 75 seconds, is an unfair number to average with the others for a
server, then you can delete that line or edit as you wish...


- Easy to edit configuration file

Use an ASCII editor. The configuration file has more info for each field.

The configuration file has entries as follows:

DST='YES'
AVG='NO'
LOGFILE='s:atomic.log'

TIMESERVER.1='time-A.timefreq.bldrdoc.gov'
TIMESERVER.2='time-B.timefreq.bldrdoc.gov'
TIMESERVER.3='time-a.nist.gov'
TIMESERVER.4='time-b.nist.gov'
TIMESERVER.5='utcnist.colorado.edu'
TIMESERVER.6='time.nist.gov'
TIMESERVER.7='time-nw.nist.gov'
TIMESERVER.8='utcnist1.reston.mci.net'
TIMESERVER.9='nist1.datum.com'


Note that the configuration file is in a very specific format.
If an entry is in single quotes, make the changes within the quotes.
I have included the 9 "Stratum 1 Class" timeservers which means they have
DIRECT connections to the time standard.
You may wish to use Stratum 2 Servers for quicker connectivity.


- Docs now use '#' symbol to mark changed areas.

As demonstrated in 3.0 below, the hash '#' mark will make it easier to
"zoom" to the changed areas for experienced users.


=======================================================================



1.0 Why?

Most clocks 'lose' or 'gain' time over the course of days, weeks, etc.

Example - My CASIO Data Bank watch gains about 8 seconds a week.
          My Amiga 3000 loses about 4 seconds each week.



2.0 Recommendation:

   2.1  - Use this program at least once a month to keep in 'sync' with the
          Atomic Clock.

   2.2  - Use the example AmiTCP:db/user-startnet file to atuomatically
          'access' the clock.

   2.3  - Use the "Events" service in Miami to run everytime you log on.
          Add it to "Events" in Miami as follows:
   (Doing this automatically runs Atomic.rexx everytime you use Miami!)

      2.3.1) Start Miami
      2.3.2) Select "Events"
      2.3.3) Select the "Online - Filename Box" and enter
             's:atomic.rexx' (no quotes, and the "n" is for NO DST-
             change this to y in the summer)
      2.3.4) Select "Console name" box and enter:
              CON:2/10/640/300/Atomic Clock/AUTO/CLOSE
              Recommend larger window if displaying averages

  3.0 Program Operation:

   3.1  - Starts with or without DST or AVG display ARGs

   3.2  - Recommend using as follows:
          >s:atomic.rexx     or    >s:atomic.rexx a
          (The 'a' means display average connect time for each server)


      3.2.1 Now also uses the 'a' option as follows:
          >s:atomic.rexx a  or    >s:atomic.rexx
          without 'a' ARG, uses AVG field in atomic.conf
       (This displays average connect time for all servers by analyzing the
       current log file = Default time is 0.1)
          Unit of measure is SECONDS

   3.3  - Optional start using ICON (uses ARGs from atomic.conf)

   3.4  - Displays the ATOMIC CLOCK start up screen

   3.5  - Checks to see if the TCP: device is available
      3.5.1 - Reads config file
      3.5.2 - Analyzes log file
      3.5.3 - Displays avergae connect time (if AVG field is 'YES'
              or if 'a' parameter is passed as ARG) i.e.
              >s:atomic.rexx a

   3.6  - Reads the Atomic Clock
      3.6.1 - Checks Server Health
      3.6.2 - Calculates if Daylight Savings Time or Standard Time

   3.7  - Sets your computer to sync with the Atomic Clock

   3.8  - Computes your Timezone (based upon locale.prefs)

   3.9  - Readjusts your clock based upon timezone

   3.10 - Computes and displays the differences in your system clock

   3.11 - Logs connection in s:atomic.log file



4.0 Other Suggestions:

   4.1 - Add to your ToolsDaemon as follows:
         -- Program Type - CLI
         -- s:atomic.rexx

   4.2 - OVERRIDE mode (Applies to DST users ONLY)
         --Use a parameter on the day of a DST or ST change to ensure your
           timezone is NOT changed until 0200 local, or else the program
           will automatically change to DST or ST at 0200 UTC.

           NOT OVERRIDING WILL result in a change to your clock causing a 1
           hour difference until the 'official' changeover

           This may be acceptable for most users.

           The duration of your 'inaccuracy' is dependent upon number of
           hours your timezone differs from UTC and when you connect before
           and after a change.

           Atomic.rexx does NOT automatically change your system clock to
           DST (or ST) until you connect to a server!  In other words, you
           should run this program as soon as possible AFTER a UTC change.


5.0 Bug Reports

   5.1 - Immediately report all bugs and provide the following:
         -- Atomic.rexx version
         -- AmigaDOS version
         -- TCP program name and version (i.e. AmiTCP 4.2, MIAMI 3.0)
         -- Timezone



6.0 Future Enhancements planned???

   6.1 - Compile a C version

   6.2 - Write REBOL or Perl version?



Have fun...   ;)

John...I REALLY DO like this Amiga!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


