diff options
author | Scott James Remnant | 2009-03-04 18:10:43 +0100 |
---|---|---|
committer | Karel Zak | 2009-03-10 13:27:49 +0100 |
commit | 88a3372e88c4ccd2714c3d95ef4719140436214a (patch) | |
tree | 50ef4dec2a50ab7fbd753289925bc3e2d61c2188 /hwclock/hwclock.8 | |
parent | cal: determine the first day of week from the locale (diff) | |
download | kernel-qcow2-util-linux-88a3372e88c4ccd2714c3d95ef4719140436214a.tar.gz kernel-qcow2-util-linux-88a3372e88c4ccd2714c3d95ef4719140436214a.tar.xz kernel-qcow2-util-linux-88a3372e88c4ccd2714c3d95ef4719140436214a.zip |
hwclock: add --systz option to set system clock from itself
Since the system clock time is already set from the hardware clock by the
kernel (when compiled with CONFIG_RTC_HCTOSYS), there's no particular need to
read the hardware clock again.
This option sets the system clock using itself as a reference if the
hardware clock was in local time. The resulting system clock time
is in UTC, with the kernel timezone set to the difference.
[kzak@redhat.com: - fix the condition that controls read_adjtime() call]
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'hwclock/hwclock.8')
-rw-r--r-- | hwclock/hwclock.8 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/hwclock/hwclock.8 b/hwclock/hwclock.8 index 31eda21f3..7f0c53d94 100644 --- a/hwclock/hwclock.8 +++ b/hwclock/hwclock.8 @@ -54,6 +54,25 @@ This is a good option to use in one of the system startup scripts. .B \-w, \-\-systohc Set the Hardware Clock to the current System Time. .TP +.B \-\-systz +Reset the System Time based on the current timezone. + +Also set the kernel's timezone value to the local timezone +as indicated by the TZ environment variable and/or +.IR /usr/share/zoneinfo , +as +.BR tzset (3) +would interpret them. +The obsolete tz_dsttime field of the kernel's timezone value is set +to DST_NONE. (For details on what this field used to mean, see +.BR settimeofday (2).) + +This is an alternate option to +.B \-\-hctosys +that does not read the hardware clock, and may be used in system startup +scripts for recent 2.6 kernels where you know the System Time contains +the Hardware Clock time. +.TP .B \-\-adjust Add or subtract time from the Hardware Clock to account for systematic drift since the last time the clock was set or adjusted. See discussion |