]> git.ipfire.org Git - thirdparty/util-linux.git/commit
hwclock: add --systz option to set system clock from itself
authorScott James Remnant <scott@ubuntu.com>
Wed, 4 Mar 2009 17:10:43 +0000 (17:10 +0000)
committerKarel Zak <kzak@redhat.com>
Tue, 10 Mar 2009 12:27:49 +0000 (13:27 +0100)
commit88a3372e88c4ccd2714c3d95ef4719140436214a
tree50ef4dec2a50ab7fbd753289925bc3e2d61c2188
parent0a9bead039d3d5c1445d94b9f439e8b1d08b4003
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>
hwclock/hwclock.8
hwclock/hwclock.c