-.TH HWCLOCK 8 "02 March 1998"
+.TH HWCLOCK 8 "06 August 2008"
.SH NAME
hwclock \- query and set the hardware clock (RTC)
.SH SYNOPSIS
-.BR "hwclock \-r" " or " "hwclock \-\-show"
-.br
-.BR "hwclock \-w" " or " "hwclock \-\-systohc"
-.br
-.BR "hwclock \-s" " or " "hwclock \-\-hctosys"
-.br
-.BR "hwclock \-a" " or " "hwclock \-\-adjust"
-.br
-.BR "hwclock \-v" " or " "hwclock \-\-version"
-.br
-.B "hwclock \-\-set \-\-date=newdate"
-.br
-.B "hwclock \-\-getepoch"
-.br
-.B "hwclock \-\-setepoch \-\-epoch=year"
-.PP
-other options:
-.PP
-.B "[\-u|\-\-utc] \-\-localtime \-\-noadjfile \-\-directisa"
-.B "\-\-test [\-D|\-\-debug]"
-.B "\-\-rtc=filename"
-.B "\-\-adjfile=filename"
-.PP
-and arcane options for DEC Alpha:
-.PP
-.B "[\-A|\-\-arc] [\-J|\-\-jensen] [\-S|\-\-srm] [\-F|\-\-funky-toy]"
-.PP
-Minimum unique abbreviations of all options are acceptable.
-.PP
-Also, \-h asks for a help message.
+.BR "hwclock [functions] [options]"
.SH DESCRIPTION
.B hwclock
compensate for systematic drift (where the clock consistently gains or
loses time at a certain rate if left to run).
-.SH OPTIONS
+.SH FUNCTIONS
You need exactly one of the following options to tell
.B hwclock
what function to perform:
.PP
.TP
-.B \-\-show
+.B \-r, \-\-show
Read the Hardware Clock and print the time on Standard Output.
The time shown is always in local time, even if you keep your Hardware Clock
in Coordinated Universal Time. See the
.B \-\-date
option.
.TP
-.B \-\-hctosys
+.B \-s, \-\-hctosys
Set the System Time from the Hardware Clock.
Also set the kernel's timezone value to the local timezone
This is a good option to use in one of the system startup scripts.
.TP
-.B \-\-systohc
+.B \-w, \-\-systohc
Set the Hardware Clock to the current System Time.
.TP
.B \-\-adjust
.B \-\-getepoch
option for details.
.TP
-.B \-\-version
+.B \-v, \-\-version
Print the version of
.B hwclock
on Standard Output.
.sp
.I hwclock --setepoch --epoch=1952
+
+.SH OPTIONS
.PP
The following options apply to most functions.
.TP
-.B \-\-utc
+.B \-u, \-\-utc
.TP
.B \-\-localtime
Indicates that the Hardware Clock is kept in Coordinated Universal
overrides the default /etc/adjtime.
.TP
-.B \-\-rtc=filename
+.B \-f, \-\-rtc=filename
overrides the default /dev file name, which is
.IR /dev/rtc
on many platforms but may be
"hwclock - query and set the hardware clock (RTC)\n\n"
"Usage: hwclock [function] [options...]\n\n"
"Functions:\n"
- " --help show this help\n"
- " --show read hardware clock and print result\n"
- " --set set the rtc to the time given with --date\n"
- " --hctosys set the system time from the hardware clock\n"
- " --systohc set the hardware clock to the current system time\n"
- " --adjust adjust the rtc to account for systematic drift since \n"
- " the clock was last set or adjusted\n"
- " --getepoch print out the kernel's hardware clock epoch value\n"
- " --setepoch set the kernel's hardware clock epoch value to the \n"
- " value given with --epoch\n"
- " --version print out the version of hwclock to stdout\n"
- "\nOptions: \n"
- " --utc the hardware clock is kept in coordinated universal time\n"
- " --localtime the hardware clock is kept in local time\n"
- " --rtc=path special /dev/... file to use instead of default\n"
- " --directisa access the ISA bus directly instead of %s\n"
- " --badyear ignore rtc's year because the bios is broken\n"
- " --date specifies the time to which to set the hardware clock\n"
- " --epoch=year specifies the year which is the beginning of the \n"
- " hardware clock's epoch value\n"
- " --noadjfile do not access /etc/adjtime. Requires the use of\n"
- " either --utc or --localtime\n"
- " --adjfile=path specifies the path to the adjust file (default is\n"
- " /etc/adjtime)\n"
+ " -h | --help show this help\n"
+ " -r | --show read hardware clock and print result\n"
+ " --set set the rtc to the time given with --date\n"
+ " -s | --hctosys set the system time from the hardware clock\n"
+ " -w | --systohc set the hardware clock to the current system time\n"
+ " --adjust adjust the rtc to account for systematic drift since\n"
+ " the clock was last set or adjusted\n"
+ " --getepoch print out the kernel's hardware clock epoch value\n"
+ " --setepoch set the kernel's hardware clock epoch value to the \n"
+ " value given with --epoch\n"
+ " -v | --version print out the version of hwclock to stdout\n"
+ "\nOptions: \n"
+ " -u | --utc the hardware clock is kept in UTC\n"
+ " --localtime the hardware clock is kept in local time\n"
+ " -f | --rtc=path special /dev/... file to use instead of default\n"
+ " --directisa access the ISA bus directly instead of %s\n"
+ " --badyear ignore rtc's year because the bios is broken\n"
+ " --date specifies the time to which to set the hardware clock\n"
+ " --epoch=year specifies the year which is the beginning of the \n"
+ " hardware clock's epoch value\n"
+ " --noadjfile do not access /etc/adjtime. Requires the use of\n"
+ " either --utc or --localtime\n"
+ " --adjfile=path specifies the path to the adjust file (default is\n"
+ " /etc/adjtime)\n"
+ " --test do everything except actually updating the hardware\n"
+ " clock or anything else\n"
+ " -D | --debug debug mode\n"
+ "\n"
),RTC_DEV);
#ifdef __alpha__
fprintf(usageto, _(
- " --jensen, --arc, --srm, --funky-toy\n"
- " tell hwclock the type of alpha you have (see hwclock(8))\n"
+ " -J|--jensen, -A|--arc, -S|--srm, -F|--funky-toy\n"
+ " tell hwclock the type of alpha you have (see hwclock(8))\n"
+ "\n"
) );
#endif
-
fflush(stdout);
if (fmt) {
usageto = stderr;