I found the following work-around: set NTPD_FORCE_SYNC_ON_STARTUP="no" in /etc/sysconfig/ntp Bjoern Voigt wrote:
Hello,
since openSUSE 12.2 I see, that the system time is always wrong under the following conditions:
- openSUSE 12.2 - BIOS clock stores localtime - systemd init - ntp is configured as server or as "update time once on boot" and uses external ntp time servers - NTPD_FORCE_SYNC_ON_STARTUP="yes" in /etc/sysconfig/ntp (default setting) - no network connection to ntp servers on boot
After some debugging I found, that BIOS clock is always set to UTC (Europe/Berlin - 2 hours) on boot, when /etc/init.d/ntp start is executed (indirectly by systemd). On next boot system time initializes from the false UTC BIOS time.
There are several bug reports about systemd clock bugs:
https://bugzilla.novell.com/show_bug.cgi?id=774553 https://bugzilla.novell.com/show_bug.cgi?id=779440 https://bugzilla.novell.com/show_bug.cgi?id=785868 https://bugzilla.novell.com/show_bug.cgi?id=769535 https://bugzilla.novell.com/show_bug.cgi?id=773323 https://bugzilla.novell.com/show_bug.cgi?id=764690 https://bugzilla.novell.com/show_bug.cgi?id=732769
Are there chances to get this bug fixed?
I think, that the unconditional option "--utc" in /etc/init.d/ntp such as /sbin/hwclock --systohc $HWCLOCK --utc --noadjfile causes the problems.
Of course, setting BIOS time to UTC fixes the issue, but this is not an ideal solution for dual boot PCs (especially with Windows XP). Having a stable internet connection is also an option. But what about mobile devices (e.g. notebooks with openSUSE and Windows XP)?
Here is my full setup and a demonstration:
/etc/sysconfig/clock without comments SYSTOHC="" FORCE_SYSTOHC="no" BADYEAR="no" HCTOSYS_DEVICE="" USE_HWCLOCK="yes" USE_ADJUST="no" TIMEZONE="Europe/Berlin" DEFAULT_TIMEZONE="Europe/Berlin"
/etc/sysconfig/ntp without comments NTPD_OPTIONS="-g -u ntp:ntp" NTPD_RUN_CHROOTED="yes" NTPD_CHROOT_FILES="" NTP_PARSE_LINK="" NTP_PARSE_DEVICE="" NTPD_FORCE_SYNC_ON_STARTUP="yes" NTPD_FORCE_SYNC_HWCLOCK_ON_STARTUP="yes"
/etc/localtime lrwxrwxrwx 1 root root 36 23. Okt 11:28 /etc/localtime -> ..//usr/share/zoneinfo/Europe/Berlin
cat /etc/adjtime 0.000000 1350982587 0.000000 1350982587 LOCAL
demonstration: # date Tue Oct 23 11:30:54 CEST 2012 # hwclock Tue Oct 23 11:30:58 2012 -0.735161 seconds # /etc/init.d/ntp restart redirecting to systemctl # date Tue Oct 23 11:31:05 CEST 2012 # hwclock Tue Oct 23 09:31:08 2012 -0.750796 seconds <<< UTC !
Greetings, Björn
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org