Setclock is a standard Xenix program which allows the super user to
read and set the IBM PC/AT hardware battery-backup clock.  This is
a replacement for the setclock supplied with both the Xenix based
on System III and the one based on System V.

This version of setclock was motivated by three reasons:

1. Unix handles Daylight Savings time automatically.  Yet in Xenix, a Unix
clone, one must manually change to Daylight Savings Time.  This setclock
interface requires no manual intervention.

2. All Unix systems released before November 1986 will not know when
Daylight Savings Time begins because Congress moved the starting time
three or four weeks earlier to the first rather than the last Sunday
in April 1987.  This version of setclock produces the right local
time even if ctime fails -- although it does mean that the system will run
an hour off GMT for three weeks and say it is standard time when it is really
daylight savings time.  This is the fault of ctime.

3. It would be nice to synchronize the clock more accurately than somewhere
within a minute.  Therefore this setclock allows waiting until the minute
changes before it returns.  This will synchronize to within about a second.
It is not clear to me that setting the time in the hardware clock resets
the seconds on the clock to zero, but that is yet another problem and requires
fixing the clock driver.


To install setclock:

    0.  Unpack the shar file.

    1.  Checkout the make file and make appropriate local changes.
        In particular make sure that the OFF flag is the proper value
        in hours and fractions of an hour from Greenwich.  See the
        man page.  It is distributed with a value for US West Coast Time.
        If your Xenix ctime knows about the new 1987 daylight savings
        time rules then delete the -DBADDST flag from CFLAGS.

    2.  Run `make'.  This compiles and links the program.

    3.  Go su.  From here on be careful (huh?).

    4.  Run `make save' to save copies of /etc/setclock and /usr/lib/syncclock
        These will be overwritten by the next step.  Once you have a copy of
        the distributed system programs, you should not redo this step.

    5.  Run `make install'.  It will copy the new setclock into /etc and
        the manual page into /usr/man/man7.  It will also create a new
        shell script and copy it to /usr/lib/syncclock.

    6.  By hand you will have to change /etc/rc so that it uses the
        proper flags in its call to setclock.   For example on the US
        West Coast `setclock' should be changed to `setclock -s 8.0'.

    7.  You're done with the installation.

Author:        Robert Uzgalis
Organization:  Tigertail Associates
               320 North Bundy Drive
               Los Angeles, California 90049
               USA

Arpa address:  buz@ucla-cs.arpa
               buz@locus.ucla.edu
uucp address:  ucla-cs!buz

Copyright (C) 1986, 1987 Tigertail Associates, All rights reserved.
