Package: tzdata Version: 2016a-1 Severity: normal Hi,
I lately upgraded my system to current Strech. Since that day, my clock is set one hour in advance after each reboot. The proper settings are in "/etc/adjtime", i.e. "LOCAL". The link "/etc/localtime" is set to my timzeone "/usr/share/zoneinfo/Europe/Paris". When I run "hwclock -s" manually after boot, system time is set accordingly to the local time from the hw clock. The incorrect time happens to be applied when running "/lib/udev/hwclock-set", the timezone info does not seem to be available or used at that time, and then hwclock sets the system to UTC from the hardware clock, which is read as UTC eventhough it is registered as "LOCAL" in "/etc/adjtime". So, my UTC system time is one hour in advance, since my hardware clock is at CET, i.e. UTC+1. I downgraded to "tzdata-2015g-0+deb8u1", and it behaved the expected way: the system clock is set to UTC after reboot when reading the local time from the hardware clock. I don't know how the "tzdata" package affects this, here are some logging information gathered with "tzdata-2015g-0+deb8u1" and "tzdata-2016a-1" packages. I also attach the modified "/lib/udev/hwclock-set" script I used to get this logging information. The noteworthy part is that when running "date" (last printed line of each set), the displayed timezone is "CET" in Jessie package, and "UTC" in current Strecth package. So, when "hwclock" sets the time to local time, it seems to see "local time" as "UTC" in Strech. When I set "UTC" in "/etc/adjtime", it behaves normally: no timezone conversions are needed indeed. Regards, Christophe -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (985, 'testing'), (120, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 4.3.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages tzdata depends on: ii debconf [debconf-2.0] 1.5.58 tzdata recommends no packages. tzdata suggests no packages. -- debconf information: tzdata/Zones/Pacific: tzdata/Zones/Antarctica: * tzdata/Areas: Europe * tzdata/Zones/Etc: GMT+1 tzdata/Zones/Indian: tzdata/Zones/Arctic: tzdata/Zones/US: tzdata/Zones/SystemV: tzdata/Zones/Africa: tzdata/Zones/America: * tzdata/Zones/Europe: Paris tzdata/Zones/Atlantic: tzdata/Zones/Australia: tzdata/Zones/Asia:
#!/bin/sh # Reset the System Clock to UTC if the hardware clock from which it # was copied by the kernel was in localtime. dev=$1 if [ -e /run/systemd/system ] ; then exit 0 fi if [ -e /run/udev/hwclock-set ]; then exit 0 fi if [ -f /etc/default/rcS ] ; then . /etc/default/rcS fi # These defaults are user-overridable in /etc/default/hwclock BADYEAR=no HWCLOCKACCESS=yes HWCLOCKPARS= HCTOSYS_DEVICE=rtc0 if [ -f /etc/default/hwclock ] ; then . /etc/default/hwclock fi echo "* hwclock-set" >> /run/udev/hwclock-set hwclock -r --debug >> /run/udev/hwclock-set date >> /run/udev/hwclock-set if [ yes = "$BADYEAR" ] ; then /sbin/hwclock --rtc=$dev --systz --badyear /sbin/hwclock --rtc=$dev --hctosys --badyear else /sbin/hwclock --rtc=$dev --systz echo "* hwclock-set: --systz" >> /run/udev/hwclock-set hwclock -r --debug >> /run/udev/hwclock-set date >> /run/udev/hwclock-set /sbin/hwclock --rtc=$dev --hctosys echo "* hwclock-set: --hctosys" >> /run/udev/hwclock-set hwclock -r --debug >> /run/udev/hwclock-set date >> /run/udev/hwclock-set fi # Note 'touch' may not be available in initramfs #> /run/udev/hwclock-set
* hwclock-set hwclock from util-linux 2.27.1 Using the /dev interface to the clock. Last drift adjustment done at 1457178708 seconds after 1969 Last calibration done at 1457178708 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2016/03/05 12:52:21 Hw clock time : 2016/03/05 12:52:21 = 1457178741 seconds since 1969 Time since last adjustment is 33 seconds Calculated Hardware Clock drift is -1.999986 seconds Sat Mar 5 12:52:20 2016 .140813 seconds Sat Mar 5 13:52:21 CET 2016 * hwclock-set: --systz hwclock from util-linux 2.27.1 Using the /dev interface to the clock. Last drift adjustment done at 1457178708 seconds after 1969 Last calibration done at 1457178708 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2016/03/05 12:52:22 Hw clock time : 2016/03/05 12:52:22 = 1457178742 seconds since 1969 Time since last adjustment is 34 seconds Calculated Hardware Clock drift is -1.999985 seconds Sat Mar 5 12:52:21 2016 .374139 seconds Sat Mar 5 12:52:22 CET 2016 * hwclock-set: --hctosys hwclock from util-linux 2.27.1 Using the /dev interface to the clock. Last drift adjustment done at 1457178708 seconds after 1969 Last calibration done at 1457178708 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2016/03/05 12:52:24 Hw clock time : 2016/03/05 12:52:24 = 1457178744 seconds since 1969 Time since last adjustment is 36 seconds Calculated Hardware Clock drift is -1.999984 seconds Sat Mar 5 12:52:22 2016 .995018 seconds Sat Mar 5 12:52:24 CET 2016
* hwclock-set hwclock from util-linux 2.27.1 Using the /dev interface to the clock. Last drift adjustment done at 1457179045 seconds after 1969 Last calibration done at 1457179045 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2016/03/05 12:57:56 Hw clock time : 2016/03/05 12:57:56 = 1457182676 seconds since 1969 Time since last adjustment is 3631 seconds Calculated Hardware Clock drift is -1.998469 seconds Sat Mar 5 12:57:55 2016 .600856 seconds Sat Mar 5 12:57:56 UTC 2016 * hwclock-set: --systz hwclock from util-linux 2.27.1 Using the /dev interface to the clock. Last drift adjustment done at 1457179045 seconds after 1969 Last calibration done at 1457179045 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2016/03/05 12:57:57 Hw clock time : 2016/03/05 12:57:57 = 1457182677 seconds since 1969 Time since last adjustment is 3632 seconds Calculated Hardware Clock drift is -1.998468 seconds Sat Mar 5 12:57:56 2016 .171441 seconds Sat Mar 5 12:57:57 UTC 2016 * hwclock-set: --hctosys hwclock from util-linux 2.27.1 Using the /dev interface to the clock. Last drift adjustment done at 1457179045 seconds after 1969 Last calibration done at 1457179045 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2016/03/05 12:57:59 Hw clock time : 2016/03/05 12:57:59 = 1457182679 seconds since 1969 Time since last adjustment is 3634 seconds Calculated Hardware Clock drift is -1.998468 seconds Sat Mar 5 12:57:57 2016 .999232 seconds Sat Mar 5 12:57:59 UTC 2016