hwclock is an administration tool for the time clocks. It can display the Hardware Clock time and set the Hardware Clock.
Under Linux bash, use the following format,
hwclock [function] [option...]
Show help text and exit.
Read hardware clock and print result.
Set the RTC to the time given with –date.
Set the system time from the hardware clock.
Set the hardware clock from the current system time.
Set the system time based on the current timezone.
Adjust the RTC to account for systematic drift since the clock was last set or adjusted.
Print out the kernel's hardware clock epoch value.
Set the kernel's hardware clock epoch value to the value given with –epoch.
Predict RTC reading at time given with –date.
Display version information and exit.
The hardware clock is kept in UTC.
The hardware clock is kept in local time.
-f, --rtc <file>
Special /dev/... file to use instead of default.
Access the ISA bus directly instead of /dev/rtc.
Ignore RTC's year because the BIOS is broken.
Specifies the time to set the hardware clock to.
Specifies the year which is the beginning of the hardware clock's epoch value.
Do not access /etc/adjtime; this requires the use of either --utc or –localtime.
Specifies the path to the adjust file; the default is /etc/adjtime.
Do not update anything, just show what would happen.
- Show the help information of hwclock command.
- Display hardware clock time.