Bug#633504: systemd: hwclock in localtime results in wrong system time

2011-07-11 Thread Michael Biebl
Am 11.07.2011 07:15, schrieb Michael Biebl:

 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
 

A third option would be, to disable setting hwclock from systemd for the time
being until util-linux has been updated.

Michael

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From bbc40bfd9f5802cde230c68a65a56344cf1770a9 Mon Sep 17 00:00:00 2001
From: Michael Biebl bi...@debian.org
Date: Mon, 11 Jul 2011 08:13:39 +0200
Subject: [PATCH] Disable hwclock for the time being

Otherwise we might end up running hwclock twice.
---
 src/main.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/main.c b/src/main.c
index 68328b7..fc2afaa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1050,12 +1050,14 @@ int main(int argc, char *argv[]) {
 if (label_init()  0)
 goto finish;
 
+#if 0
 if (hwclock_is_localtime()) {
 int min;
 
 min = hwclock_apply_localtime_delta();
 log_info(Hwclock configured in localtime, applying delta of %i minutes to system time, min);
 }
+#endif
 } else {
 arg_running_as = MANAGER_USER;
 log_set_target(LOG_TARGET_CONSOLE);
-- 
1.7.5.4



signature.asc
Description: OpenPGP digital signature


Bug#633504: systemd: hwclock in localtime results in wrong system time

2011-07-10 Thread Mourad De Clerck
Package: systemd
Version: 29-1
Severity: important

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

Thanks,

-- Mourad DC

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages systemd depends on:
ii  initscripts2.88dsf-13.10 scripts for initializing and shutt
ii  libaudit0  1.7.13-1.2Dynamic library for security audit
ii  libc6  2.13-10   Embedded GNU C Library: Shared lib
ii  libcap21:2.21-1  support for getting/setting POSIX.
ii  libcryptsetup1 2:1.3.0-3 libcryptsetup shared library
ii  libdbus-1-31.5.4-2   simple interprocess messaging syst
ii  libpam0g   1.1.3-2   Pluggable Authentication Modules l
ii  libselinux12.0.98-1.1SELinux runtime shared libraries
ii  libudev0   171-2 libudev shared library
ii  libwrap0   7.6.q-21  Wietse Venema's TCP wrappers libra
ii  udev   171-2 /dev/ and hotplug management daemo
ii  util-linux 2.19.1-2  Miscellaneous system utilities

Versions of packages systemd recommends:
ii  libpam-systemd29-1   system and service manager - PAM m

Versions of packages systemd suggests:
ii  python2.6.6-14   interactive high-level object-orie
ii  systemd-gui   29-1   system and service manager - GUI

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#633504: systemd: hwclock in localtime results in wrong system time

2011-07-10 Thread Michael Biebl
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?



signature.asc
Description: OpenPGP digital signature