On Wednesday 12 December 2007, Karel Zak wrote: > On Wed, Dec 05, 2007 at 11:22:25AM -0800, David Brownell wrote: > > > > And for the record ... see the appended, which I needed to get this > > to work on an Ubuntu Feisty system (dual booting XP, so that the RTC > > must match wall-clock time). That was the reason I ended up looking > > at this code again ... :) > > I have also system with "LOCAL" in /etc/adjtime. > > > I'm not currently submitting this, since I've not had time to test > > this the ARM systems with the suspect uClibc version. I'd like to > > understand a bit better how this bug arrived in the first place. > > If I well understand the alarm (RTC_[WK]ALM_SET) requires time in the > same mode like /dev/rtc. Which should normally be POSIX time, which is approximately UTC. > > - tm = gmtime(wakeup); > > + tm = localtime(wakeup); > > I think this change is correct. You needn't gmtime() in setup_alarm(), > because: > > - for "UTC" systems you have TZ=UTC (defined in get_basetimes()) > so localtime() always returns UTC, > - for "LOCAL" systems you need the wakeup time in real timezone so > localtime() is also correct. > > Right? Right. But I still need to do that testing on that ARM+uClibc system to see what's up with it. - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html