hwclock is a program that runs under Linux and sets and queries the Hardware Clock, which is often called the Real Time Clock, RTC, or CMOS clock. This is the program that most Linux systems use to get the time from the Hardware Clock and set the System Time at boot time. This program works on ISA (Intel), Alpha, Sparc, and M68K systems with or without /dev/rtc.
hwclock contains facilities for compensating for systematic drift in the Hardware Clock.
You can download the code, with complete documentation, from here.
To see how current your version is, look at the current change history file. You can use hwclock's --version option to find out what you're running. This same file is in the source package as src/HISTORY.
hwclock is distributed and maintained by Bryan Henderson (bryanh@giraffe-data.com).
There is another widely used version of hwclock, which is part of the util-linux package. It was forked from Bryan's version in 1999. In the time since then, far more development has gone into Bryan's version; it runs on more kinds of systems, has more features, and is far more accurate. On the other hand, due to its stability, the util-linux version is less likely to have a bug.
The reason for the fork is that at the time, the maintainer of util-linux found hwclock did not work on one of his systems, and it was easier for him to fork the previous release than to work with Bryan to fix the problem in current development code. Until then, Bryan had distributed hwclock through util-linux. (Later users of Bryan's branch with ostensibly the same environment helped Bryan to fix the problem in his branch).