summaryrefslogtreecommitdiffstats
path: root/sys-utils/hwclock.8
diff options
context:
space:
mode:
authorTom Gundersen2012-09-21 00:02:46 +0200
committerKarel Zak2012-09-21 12:07:32 +0200
commit910a090039cbd529041bfb5f6be72bf27a96bd47 (patch)
tree0ac2e08480f0a10b71faaff5bf1cce0189f8da2a /sys-utils/hwclock.8
parenthwclock: wait time in hwclock is not long enough for some ARM devices (diff)
downloadkernel-qcow2-util-linux-910a090039cbd529041bfb5f6be72bf27a96bd47.tar.gz
kernel-qcow2-util-linux-910a090039cbd529041bfb5f6be72bf27a96bd47.tar.xz
kernel-qcow2-util-linux-910a090039cbd529041bfb5f6be72bf27a96bd47.zip
hwclock: don't warp the systemtime if the RTC is in UTC
A sideeffect of 839be2ba6b44fa9dc927f081d547ebadec9de19c is that we now warp the systemtime according to the timezone, on the first call of --systz. This is not always the correct thing to do, and causes a regression for us in Arch Linux. The behavior is correct if the RTC, and hence the systemtime, is in localtime. However, if the systemtime is already in UTC we don't want to touch it when we set the kernel timezone (which we still need to do as some filesystems use this information). An almost identical issue was also fixed in systemd commit 72edcff5db936e54cfc322d9392ec46e2428fd9b. Signed-off-by: Tom Gundersen <teg@jklm.no>
Diffstat (limited to 'sys-utils/hwclock.8')
-rw-r--r--sys-utils/hwclock.811
1 files changed, 7 insertions, 4 deletions
diff --git a/sys-utils/hwclock.8 b/sys-utils/hwclock.8
index 07d9fc024..5c599ad76 100644
--- a/sys-utils/hwclock.8
+++ b/sys-utils/hwclock.8
@@ -58,10 +58,12 @@ This is a good option to use in one of the system startup scripts.
Set the Hardware Clock to the current System Time.
.TP
.B \-\-systz
-Reset the System Time based on the current timezone.
+Set the kernel's timezone and 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
+The system time is only reset on the first call after boot.
+
+The local timezone is taken to be what is
+indicated by the TZ environment variable and/or
.IR /usr/share/zoneinfo ,
as
.BR tzset (3)
@@ -74,7 +76,8 @@ 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.
+the Hardware Clock time. If the Hardware Clock is already in UTC, it is
+not reset.
.TP
.B \-\-adjust
Add or subtract time from the Hardware Clock to account for systematic