]> git.ipfire.org Git - thirdparty/util-linux.git/commit - sys-utils/hwclock.c
hwclock: don't warp the systemtime if the RTC is in UTC
authorTom Gundersen <teg@jklm.no>
Thu, 20 Sep 2012 22:02:46 +0000 (22:02 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 21 Sep 2012 10:07:32 +0000 (12:07 +0200)
commit910a090039cbd529041bfb5f6be72bf27a96bd47
tree0ac2e08480f0a10b71faaff5bf1cce0189f8da2a
parent72fc8ca062f538413419f6b282827dbd5e6a7b06
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>
sys-utils/hwclock.8
sys-utils/hwclock.c