
If the Hardware Clock is kept in local time then the time read from it must be shifted to the UTC timescale before using it to set the System Clock.

The System Clock must be kept in the UTC timescale for date-time applications to work correctly in conjunction with the timezone configured for the system. See the discussion below, under The Adjust Function. The time read from the Hardware Clock is compensated to account for systematic drift before using it to set the System Clock. s, -hctosys Set the System Clock from the Hardware Clock. Do not use this function if the Hardware Clock is being modified by anything other than the current operating system's hwclock command, such as '11 minute mode' or from dual-booting another OS. The -get function also applies drift correction to the time read, based upon the information in /etc/adjtime. Showing the Hardware Clock time is the default when no function is specified. The time shown is always in local time, even if you keep your Hardware Clock in UTC. r, -show -get Read the Hardware Clock and print its time to standard output in the ISO 8601 format.

See rtcwake(8).ĭo not use this function if the Hardware Clock is being modified by anything other than the current operating system's hwclock command, such as '11 minute mode' or from dual-booting another OS. This is useful, for example, to account for drift when setting a Hardware Clock wakeup (aka alarm). predict Predict what the Hardware Clock will read in the future based upon the time given by the -date option and the information in /etc/adjtime. For ISA machines the kernel uses the fixed Hardware Clock epoch of 1900. This epoch value is used whenever hwclock reads or sets the Hardware Clock on an Alpha machine.
TIME CLOCK SYSTEMS HARDWARE DRIVER
The RTC driver attempts to guess the correct epoch value, so setting it may not be required. The -setepoch function requires using the -epoch option to specify the year.
TIME CLOCK SYSTEMS HARDWARE FULL
For example, if the machine's BIOS sets the year counter in the Hardware Clock to contain the number of full years since 1952, then the kernel's Hardware Clock epoch value must be 1952. Epoch is the number of years into AD to which a zero year value in the Hardware Clock refers. They are used to read and set the kernel's Hardware Clock epoch value. getepoch -setepoch These functions are for Alpha machines only, and are only available through the Linux kernel RTC driver. a, -adjust Add or subtract time from the Hardware Clock to account for systematic drift since the last time the clock was set or adjusted.

The following functions are mutually exclusive, only one can be given at a time. Since v2.26 important changes were made to the -hctosys function and the -directisa option, and a new option -update-drift was added. DS Clock – A Free Digital Clock for Your Desktop | Features & Benefits
