Dear Simon, On Fri, Dec 11, 2009 at 02:04:26PM +0100, Simon Danner wrote: > Yes this seems to be the same problem. I just never tried to set alarm > with more than a hour delay because I just wanted to test it in time to > see if it fits my needs. If i set a alarm more than a hour from now on, > it works. > Im also on a daylight saving time zone. > Thanks for further exploring the problem.
Thanks for the follow up. Could you please tell me the following?
- If you set the alarm more than 1 hour beyond, does it wind back in 1
hour, or less than that? For me, if I set the alarm 1 hour and 10
minutes from now, it rings within 10 minutes.
- Does it work correctly if you run it as TZ=Etc/UTC alarmclock? I am
able to set alarm a few minutes to hours from now, and the timing is
perfect.
- Could you please compile and run the attached program as follows?
gcc -o tztest tztest.c
for i in `seq 1 10`;do ./tztest;done
Program:
<code>
#include <stdio.h>
#include <time.h>
int main(void) {
char *iso_date = "2009-12-11T2:50:00";
struct tm tm;
time_t time;
strptime(iso_date, "%FT%T", &tm);
time = mktime(&tm);
printf("%ld\n", time);
return 0;
}
</code>
The program seems to give me different outputs, like so:
1260521400
1260517800
1260517800
1260521400
1260517800
1260521400
1260517800
1260521400
1260517800
1260521400
the two variable outputs being separated by 3600 seconds. With
TZ=Etc/UTC, it gives the same output consistently.
Thanks!
Kumar
--
Light finds her treasure of colours
through the antagonism of clouds.
- Rabindranath Tagore (Fireflies, 1928)
signature.asc
Description: Digital signature

