  THIS IS THE HISTORY OF THE HWCLOCK PROGRAM

  05.05.28 BJH   Version 2.24

  When the adjtime file says the hardware clock is in local time, but not
  which local time, assume the same local time that the current process uses
  for the time that the hardware clock was last set.  Used to assume the
  same local time that the current process uses for right now.

  Fix bug: when adjtime file doesn't exist, uses arbitrary local time zone
  offset.

  03.10.01 BJH   Version 2.23

  Add --slew option.  Thanks Scott Weikart <scott@benetech.org>.

  03.06.29 BJH   Version 2.22

  Fix bug: used to assume 'timezone' global variable contained timezone 
  offset.  In fact, it contains the non-DST-adjusted timezone offset, so
  Hwclock used the wrong timezone in setting/reading hardware clock in 
  local time format.

  Fix bug: used adjtime timezone offset for reading clock in local
  time format, but C library timezone offset for setting it.  Now uses
  adjtime timezone offset for both.

  03.06.20 BJH   Version 2.21

  Include <time.h> instead of <sys/time.h> because current GNU C library
  defines 'timezone' only via the former, and the former is right anyway.
          
  03.05.31 BJH   Version 2.20

  When hw clock in local time format, keep timezone of that local time in
  adjtime file.

  Don't require superuser real uid.  (Setuid installation no longer normal).

  Setting while in 11 minute mode generates warning.

  11 minute mode does same thing as --nodrift.

  adjtime file moved to /var/lib/hwclock/adjtime.  ADJTIME_PATH environment
  variable added.

  03.03.31 BJH   Version 2.19

  Add --nodrift option.

  02.11.28 BJH   Version 2.18

  Fix setting of kernel timezone value - use current dst information instead
  of 'daylight' environment variable.

  02.08.04 BJH   Version 2.17
  
  Fix crash when adjtime file specifies LOCAL.

  Fix invalid epoch calculation when /etc/adjtime does not exist.

  02.05.17 BJH   Version 2.16

  Add error messages to explain the failure when the hardware clock is not
  advancing.  Change timeout on busywait method of rtc tick detection to
  a time instead of a million iterations.

  02.01.22 BJH   Version 2.15

  Credibility check on drift is 5 minutes per day or 30 minutes total
  instead of just 30 minutes total.
                 
  User can have any zero year he wants for his hardware clock.
  --epoch option specifies explicitly; adjtime file remembers.
  (--epoch formerly just affected --setepoch).  Kernel epoch value no
  longer affects anythings (except --getepoch).  --arc makes zero year
  assumed to be 1952.

  01.08.18 BJH   Version 2.14

  Works on PCI (newer) sparcs.

  01.05.05 BJH   Version 2.13

  Add --fast option.

  Add --rtc option.

  Use /dev/misc/rtc instead of /dev/rtc if it exists.

  Validate that /dev/rtc, etc. is a character device special file.  
  
  Don't select direct ISA clock access method if not superuser.

  Improve error and debugging messages concerning the search for a clock
  access method.

  00.04.21 BJH   Version 2.12

  Put detailed explanation of failure of open(/dev/rtc) in --debug output.

  Fix bug in the 2 second timeout from Version 2.11.

  00.02.15 BJH   Version 2.11
                 
  Put 2 second timeout on wait for clock tick via /dev/rtc.  Some rtc drivers
  on some machines accept the "enable interrupt" ioctl, but aren't actually
  capable of delivering the interrupt, so this stops Hwclock from just 
  hanging.  When it times out, it reverts to a busywait for the clock tick.
  
  00.12.02 BJH   Version 2.10

  Add fractional part of last adjustment time to adjtime file to improve
  accuracy.  Thanks to James P Rutledge <jimrutledge@earthlink.net>.

  Fix compilation bug on Sparc (don't #include asm/io.h).

  Use tm_isdst instead of 'daylight' to determine if it's DST for
  --show.  In glibc 2, 'daylight' tells only if DST exists; not if it
  is in effect.

  00.05.29 BJH   Version 2.9

  Record System Time changes in utmp, wtmp.

  00.05.22 BJH   Version 2.8

  Account for Hardware Clock setting 500 ms retroactively, which made
  hwclock always set the clock 500 ms fast.  Also verify that the clock
  got set to the expected value.

  Add --correct option.

  Tell in man page how to interpret --show output.

  Put correct program name in NAME section of man page.

  Tell in README file about bug in Red Hat 6.0 that keeps distributed binary
  from working.
  
  Tell in man page where to get adjtimex, date, and tzset.

  Include version in all debug output.

  Add local time zone name to --show output.

  99.05.03 BJH   Version 2.7

  In --hctosys, account for uncorrected (accumulated) drift.

  Move tzset() so the possible slow reading of files it does does not
  impact timing.

  Correct check for improbably large drift so it checks the absolute
  value of the drift.  Thanks ao112@rgfn.epcc.edu (James P. Rutledge).

  Some debug output in days instead of seconds.  Thanks ao112@rgfn.epcc.edu 
  (James P. Rutledge).

  99.04.09 BJH   Version 2.6

  Fix compilation errors with some compilers and kernel and libc 
  interface headers.  Make it work with glibc 2.

  Work with KDHWCLK interface even if not compiled with kernel headers 
  that say it's in the kernel.  (As long as it's actually in the kernel
  at runtime!).

  99.04.08 BJH   Version 2.5

  Make it work on Alphas without /dev/rtc.  Thanks to David Mosberger
  <davidm@azstarnet.com>, Jay Estabrook <jestabro@amt.tay1.dec.com>,
  Martin Ostermann <ost@coments.rwth-aachen.de>, Andries Brouwer
  <aeb@cwi.nl>.  Most of this code is lifted from another program
  called "clock" (not the original ancestor of hwclock) that has 
  circulated for use on Alpha.

  Make it work on Sparc.

  Add --badyear option.  Thanks to David J Coffin (dcoffin@shore.net)
  for the design of this.

  Add --localtime option, local/UTC value in adjtime file, and defaults
  for local/utc.

  Don't set CMOS memory Byte 50 (century byte).  On some machines,
  that byte not only isn't used as a century byte, but it is used for
  something else.

  Don't update the drift factor if the variation is so huge that it 
  probably wasn't due to drift.

  Compute drift factor with better precision.

  98.08.12 BJH   Version 2.4 

  Don't use century byte from Hardware Clock.  Add comments telling why.


  98.06.20 BJH   Version 2.3.

  Make --hctosys set the kernel timezone from TZ environment variable
  and/or /usr/lib/zoneinfo.  From Klaus Ripke (klaus@ripke.com).

  98.03.05 BJH.  Version 2.2.  

  Add --getepoch and --setepoch.  

  Fix some word length things so it works on Alpha.

  Make it work when /dev/rtc doesn't have the interrupt functions.
  In this case, busywait for the top of a second instead of blocking and
  waiting for the update complete interrupt.

  Fix a bunch of bugs too numerous to mention.

  97.06.01: BJH.  Version 2.1.  Read and write the century byte (Byte
  50) of the ISA Hardware Clock when using direct ISA I/O.  Problem
  discovered by job (jei@iclnl.icl.nl).
  
  Use the rtc clock access method in preference to the KDGHWCLK method.
  Problem discovered by Andreas Schwab <schwab@LS5.informatik.uni-dortmund.de>.

  November 1996: Version 2.0.1.  Modifications by Nicolai Langfeldt
  (janl@math.uio.no) to make it compile on linux 1.2 machines as well
  as more recent versions of the kernel. Introduced the NO_CLOCK
  access method and wrote feature test code to detect absense of rtc
  headers.


  Bryan Henderson based hwclock on the program "clock", in September
  1996.  While remaining mostly backward compatible with clock,
  hwclock added the following:

    - You can set the hardware clock without also modifying the Linux
      system clock.

    - You can read and set the clock with finer than 1 second precision.

    - When you set the clock, hwclock automatically refigures the drift
      rate, based on how far off the clock was before you set it.  (This
      is the drift rate that is used with the --adjust function to 
      automatically adjust the clock periodically to compensate for drift).

    - More mnemonic GNU-style command line options.

    - Comments describing how the clock and program work to improve 
      maintainability.

    - Removed the old dead I/O code that worked without the inb/outb
      instructions and without the asm/io.h definitions.

  The first version of hwclock was Version 2.

  Here is the history section from the "clock" program at the time it was
  used as a basis for hwclock:

  V1.0

  
  V1.0 by Charles Hedrick, hedrick@cs.rutgers.edu, April 1992.
 
 ********************
  V1.1
  Modified for clock adjustments - Rob Hooft, hooft@chem.ruu.nl, Nov 1992
  Also moved error messages to stderr. The program now uses getopt.
  Changed some exit codes. Made 'gcc 2.3 -Wall' happy.
 
 *****
  V1.2
 
  Applied patches by Harald Koenig (koenig@nova.tat.physik.uni-tuebingen.de)
  Patched and indented by Rob Hooft (hooft@EMBL-Heidelberg.DE)
  
  A free quote from a MAIL-message (with spelling corrections):
 
  "I found the explanation and solution for the CMOS reading 0xff problem
   in the 0.99pl13c (ALPHA) kernel: the RTC goes offline for a small amount
   of time for updating. Solution is included in the kernel source 
   (linux/kernel/time.c)."
 
  "I modified clock.c to fix this problem and added an option (now default,
   look for USE_INLINE_ASM_IO) that I/O instructions are used as inline
   code and not via /dev/port (still possible via #undef ...)."
 
  With the new code, which is partially taken from the kernel sources, 
  the CMOS clock handling looks much more "official".
  Thanks Harald (and Torsten for the kernel code)!
 
 *****
  V1.3
  Canges from alan@spri.levels.unisa.edu.au (Alan Modra):
  a) Fix a few typos in comments and remove reference to making
     clock -u a cron job.  The kernel adjusts cmos time every 11
     minutes - see kernel/sched.c and kernel/time.c set_rtc_mmss().
     This means we should really have a cron job updating
     /etc/adjtime every 11 mins (set last_time to the current time
     and not_adjusted to ???).
  b) Swapped arguments of outb() to agree with asm/io.h macro of the
     same name.  Use outb() from asm/io.h as it's slightly better.
  c) Changed CMOS_READ and CMOS_WRITE to inline functions.  Inserted
     cli()..sti() pairs in appropriate places to prevent possible
     errors, and changed ioperm() call to iopl() to allow cli.
  d) Moved some variables around to localise them a bit.
  e) Fixed bug with clock -ua or clock -us that cleared environment
     variable TZ.  This fix also cured the annoying display of bogus
     day of week on a number of machines. (Use mktime(), ctime()
     rather than asctime() )
  f) Use settimeofday() rather than stime().  This one is important
     as it sets the kernel's timezone offset, which is returned by
     gettimeofday(), and used for display of MSDOS and OS2 file
     times.
  g) faith@cs.unc.edu added -D flag for debugging
 
  V1.4: alan@SPRI.Levels.UniSA.Edu.Au (Alan Modra)
        Wed Feb  8 12:29:08 1995, fix for years > 2000.
        faith@cs.unc.edu added -v option to print version.  */


