Package: adjtimex Version: 1.16-1 Severity: normal Hello,
Reading the localtime hardware clock with adjtimex is false by one hour when a to-DST or back transition occured since last CMOS clock write. Example here CMOS was last set (with hwclock 2.23) on March 22 CET +0100 winter time, and still runs with this timezone offset. On April 17 CEST +0200 summer time, adjtimex 1.16 gives: | # adjtimex --compare=1 | --- current --- -- suggested -- | cmos time system-cmos 2nd diff tick freq tick freq | 1082227030 3600.239205 3600.239205 10000 -3341157 | | # cat /etc/adjtime | -0.858 1079978414 0.000000 | 1079978414 | LOCAL 1900 -3600 | 0.000000 Adjtimex wrongly takes as CMOS timezone offset the current offset at read time. The system-cmos=3600.239205 shows a drift much bigger than real. The hardware clock timezone offset is fixed at write time, it doesn't jump to summer by itself. Suggestion: Since version 2.5, hwclock records CMOS timezone UTC or LOCAL as 1st item of 3rd line of /etc/adjtime. If it's "UTC", take offset 0 as if --utc was used. Otherwise: Since version 2.20, hwclock records CMOS timezone offset in 3rd item of 3rd line of /etc/adjtime. If it's there, take it. Otherwise if last adjustement date (2nd item of 1st line) exists and is not zero, take timezone offset at this last write time. Otherwise take (as now) the possibly false current offset. Interpret the CMOS clock value Adjtimex reads as beeing in this timezone offset. Will need a mkgmtime()-like function taking a fixed offset. BTW the 1.20 Changelog entry of 2004-09-19 has a typo in my name. It should be Guibert, without "l". Critical bug. ;-) Alain. -- System Information Debian Release: 3.0 Architecture: i386 Kernel: Linux Kassad 2.4.18 #8 dim mar 21 19:05:27 CET 2004 i586 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] Versions of packages adjtimex depends on: ii debconf 1.0.32 Debian configuration management sy ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]