First the author's description, then the quickstart guide

------------------------------------------------------------------------

CLOCK  consists  of  two  programs  that  give  you  complete control over the
operation  of  your  calendar  (battery-protected)  clock  and  your  DOS/BIOS
internal  timer.    The  normal  DOS mode of operation is to read the calendar
clock  when  you  boot  the system and set the internal timer.  Thereafter all
read operations refer only to the internal timer while time setting operations
write to both clocks.

Some  of  the  drawbacks  to  the  standard DOS clock operation that the CLOCK
programs address are:

    o    There  is  no  provision  to switch time zones without resetting the
         system time.

    o    DOS  does not handle automatic changes between daylight savings time
         and standard time.

    o    The DOS/BIOS internal timer often drifts quite rapidly away from the
         time maintained by the more accurate calendar clock.

    o    Even  the  calendar clock drifts slowly away from the accurate time.
         DOS provides no way to automatically adjust for that drift.

    o    If  your  battery  is  failing  or  some  other hardware or software
         problem  messes  up the time in your calendar clock, there is no way
         to  detect  that except by manually displaying the time and checking
         it.

    o    The  standard  DOS and BIOS software on some PCs can miss the change
         to a new day when the PC is left on over midnight.

    o    Your  clock  might not handle automatic changes to a new year or may
         not understand leap years.

If any of those circumstances cause problems for you, CLOCK can help.  The two
primary  programs  are  CLOCK.SYS  and  CLK.EXE.

    CLOCK.SYS is a clock device driver (CLOCK$ device).  It replaces the
    DOS  internal  clock  driver.  CLOCK.SYS provides for automatic time
    zone conversion.  It also allows you to periodically or continuously
    get  the  time  from the calendar clock.  This can totally eliminate
    problems  with  missing  day  changes  and  realtime clocks that are
    inaccurate.

    CLK.EXE  is  a  program  that  allows you to separately control your
    DOS/BIOS  internal clock and battery-protected calendar clock.  Most
    importantly,  CLK.EXE  will handle time zones and will automatically
    switch  between standard and daylight savings time for you.  It also
    supports  automatic  adjustment for calendar clock drift, checks for
    incorrect or unlikely times, and can restrict time changes.


CLOCK  consists  of  two  programs  that  give  you  complete control over the
operation  of  your  calendar  (battery-protected)  clock  and  your  DOS/BIOS
internal  timer.    The  normal  DOS mode of operation is to read the calendar
clock  when  you  boot  the system and set the internal timer.  Thereafter all
read operations refer only to the internal timer while time setting operations
write to both clocks.  In levels of DOS prior to 3.3, even time setting opera-
tions  only  wrote  to the internal timer.  In order to set the calendar clock
you had to run the SETUP program.

Some  of  the  drawbacks  to  the  standard DOS clock operation that the CLOCK
programs address are:

    o    There  is  no  provision  to switch time zones without resetting the
         system time.

    o    DOS  does not handle automatic changes between daylight savings time
         and standard time.

    o    The DOS/BIOS internal timer often drifts quite rapidly away from the
         time maintained by the more accurate calendar clock.

    o    Even  the  calendar clock drifts slowly away from the accurate time.
         DOS provides no way to automatically adjust for that drift.

    o    If  your  battery  is  failing  or  some  other hardware or software
         problem  messes  up the time in your calendar clock, there is no way
         to  detect  that except by manually displaying the time and checking
         it.

    o    If  you  have  to  run  a program that occasionally changes the time
         incorrectly,  there  is  no  way  to  protect  your clock from those
         changes.    You can also have this problem if you are a parent whose
         children  set  the  clock when you don't want them to, an instructor
         whose students reset the time, or an expert young user whose parents
         mess up your clock.

    o    If  you  need  to  experiment with special times and dates but don't
         want to have to reset your clock afterwards, DOS has no mechanism to
         h e l p.    In  order  to  test  end-of-month  processing  for  your
         application,  you have to set the date and time, run your tests, and
         then set the time and date back.

    o    The  standard  DOS and BIOS software on some PCs can miss the change
         to a new day when the PC is left on over midnight.

    o    Your  clock  might not handle automatic changes to a new year or may
         not understand leap years.

    o    You may have an older PC from before the PC/AT clock standardization
         and  your vendor no longer releases new versions of DOS for that PC.
         You  are  stuck  on  DOS  3.2 or earlier or you have to give up your
         calendar clock.

If any of those circumstances cause problems for you, CLOCK can help.  The two
primary  programs  are  CLOCK.SYS  and  CLK.EXE.    In  addition, if you are a
software  developer,  CLKDEMO  is  provided  in source code to show you how to
program the extended clock operations into your own applications.


    CLOCK.SYS is a clock device driver (CLOCK$ device).  It replaces the
    DOS  internal  clock  driver.  CLOCK.SYS provides for automatic time
    zone conversion.  It also allows you to periodically or continuously
    get  the  time  from the calendar clock.  This can totally eliminate
    problems  with  missing  day  changes  and  realtime clocks that are
    inaccurate.    CLOCK.SYS provides support for many types of calendar
    clocks including many of the original add-in clocks of the 8088 era.
    If  your  clock is not currently supported, I want to hear from you.
    I will be happy to add it to the software.

    CLK.EXE  is  a  program  that  allows you to separately control your
    DOS/BIOS  internal clock and battery-protected calendar clock.  Most
    importantly,  CLK.EXE  will handle time zones and will automatically
    switch  between standard and daylight savings time for you.  It also
    supports  automatic  adjustment for calendar clock drift, checks for
    incorrect or unlikely times, and can restrict time changes.

    CLKDEMO.EXE  is  a  small part of CLK.EXE that is provided in source
    code  (C language) form so that you can see how to add clock control
    to your own applications.


The latest version of CLOCK (3.81) has the option to automatically set two
DOS environmental variables ("TZ" and "GTZ").

------------------------------------------------------------------------

                    QUICKSTART GUIDE


Since nobody reads instructions, this is the quickstart guide:

1.  Move CLOCKnnn.EXE to a directory, and execute the file to unpack
   the contents (it's a self-extracting archive).

2.  Optionally move CLOCK.SYS, CLK.EXE, and CLK.INI to better directories.
   It is useful for CLK.EXE to be in a directory which is in the PATH,
   and it is easier if CLK.INI is in the same directory as CLK.EXE

3.  Edit CLK.INI to add two lines below . The first specifies the timezone
   rules, and the second enables auto-setting of the 'TZ' and 'GTZ'
   environment variables. The first line is country dependant - I'm
   assuming readers are in the U.K.:

   TZ=GMT0BST,M3.5.0/1,M10.5.0/2
   /T

4.  In CONFIG.SYS, add the line:

   DEVICEHIGH=<path>\CLOCK.SYS

   This syntax assumes the use of EMM386 : QEMM users, for example, will
   need a different syntax.

5.  In AUTOEXEC.BAT, as early in the file as practical, add the line:

   <path>\CLK /I

6.  If you use Windows, edit the SYSTEM.INI file. Find the line that
   looks like:

   [386Enh]

   Immediately after that line (or anywhere in the [386Enh] section),
   add the line

   SyncTime=false

7.  Reboot the machine. You should see CLOCK.SYS announce itself as
   CONFIG.SYS is processed, and see a multi-line message from CLK.EXE
   as AUTOEXEC.BAT is processed.

8.  Use the DOS 'TIME' command (or another clock setting program) to set
   the clock as accurately as possible. Note that DOS will probably offer
   the wrong time just this once, as your CMOS clock is now assumed to be
   on GMT.

9.  Use the 'CLK' command (hence recommending it be in the path) to check
   on the clock status. The current timezone name and offset should be given,
   together with the values of the CMOS clock (which should be on GMT) and
   the DOS clock (which should be on local time).

10. Use the 'SET' command to look at environmental variables. 'TZ' and 'GTZ'
   should both be set. 'TZ' should be a short value (e.g. 'GMT0', 'BST-1')
   and 'GTZ' should look similar to the 'TZ=' statement in CLK.INI

11. Give the machine some time, perhaps 2 weeks or a month, until the time
   (perhaps as reported by 'CLK') has drifted off by a fair number of
   seconds. Reset the clock (with 'TIME' or whatever) as accurately as
   possible, and immediately enter the command:

   CLK M=LAST

   This will store a correction history line in CLK.INI

12. After another similar interval, repeat step 11. This time, the screen
   output from the 'CLK' command will include a calculated correction
   factor.

13. Depending on your patience, repeat step 12 a number of times, until the
   displayed calculated correction value stays fairly constant.

14. When you're happy, after doing a 'CLK M=LAST' command, follow it
   with the command:

   CLK A=M

   This will clear the correction history lines in CLK.INI, and add
   a line specifying the correction factor to apply.


ADS Benham, G8FSL
15 April 1996