block 633504 by 629811
thanks

Hi,

Am 10.07.2011 23:23, schrieb Mourad De Clerck:
> I've got LOCAL in /etc/adjtime, and UTC=no in /etc/default/rcS.
> 
> Since systemd 29-1 my PC's clock is off by two hours on boot (the timezone
> + DST offset). So the system time is actually set to UTC. Executing
> "hwclock --hctosys" after booting corrects the system time.
> 
> I also noticed that systemd reports the following during boot:
> Hwclock configred in localtime, applying delta of 120 minutes to system time

This is a known problem.
With v29 systemd will handle set hwclock to localime if it finds the string
LOCAL in /etc/adjtime.
At the same time, util-linux will run /lib/udev/hwclock-set (triggered via udev)
and apply the localtime offset a second time.
The main difference here is, that /lib/udev/hwclock-set uses the setting
UTC=[yes|no] from /etc/default/rcS.

The solution we are planning to do is:
1/ make util-linux do nothing if it runs under systemd see [1]
2/ patch systemd to also fall back to reading /etc/default/rcS:UTC if
/etc/adjtime doesn't exist, because /etc/default/rcS has been the canonical
configuration file for this setting so far, so we need some backwards 
compatibiliy.

Until this is fixed, you can do two things:
a) Remove /etc/adjtime. This way only util-linux via hwclock-set will apply the
localtime offset
b) Modify /lib/udev/hwclock-set by hand and add
  if   [ -e /sys/fs/cgroup/systemd ]; then
    exit 0
  fi
at the top

Cheers,
Michael

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629811
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to