Name
hwclock
Synopsis
hwclock [options]
Description
System administration command. Read or set the hardware clock. This command maintains change information in /etc/adjtime, which can be used to adjust the clock based on how much it drifts over time. hwclock replaces the clock command. The single-letter options are included for compatibility with the older command.
Options
You may specify only one of the following options:
- -a
Adjust the hardware clock based on information in /etc/adjtime and set the system clock to the new time.
- --adjust
Adjust the hardware clock based on information in /etc/adjtime.
- --date date
Meaningful only with the --set option. date is a string appropriate for use with the date command.
- --debug
Print information about what hwclock is doing.
- -r, --show
Print the current time stored in the hardware clock.
- -s, --hctosys
Set the system time in accordance with the hardware clock.
- --set
Set the hardware clock according to the time given in the --date parameter.
- --test
Do not actually change anything. This is good for checking syntax.
- -u, --utc
The hardware clock is stored in Universal Coordinated Time.
- --version
Print version and exit.
- -w, --systohc
Set the hardware clock in accordance with the system time.
Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.