Bug#177940: AC_FUNC_MKTIME fail when timezone is set to GMT-2
tag 177940 + fixed-in-experimental
thanks
I used the attached program (based on the test in autoconf) to test that
this bug occurs with libc6 2.3.2.ds1-22 (the version in unstable) but
not with version 2.5.2-2 (the version in experimental). Thus, I tag it
fixed-in-experimental.
#include <time.h>
#include <stdio.h>
#define time_t_max ((time_t) ~0UL)
static int
mktime_test (time_t now)
{
struct tm *lt;
if ((lt = localtime (&now)) && mktime (lt) != now)
return 2;
now = time_t_max - now;
if ((lt = localtime (&now)) && mktime (lt) != now)
return 3;
return 0;
}
int main(void)
{
int ret;
ret = mktime_test(time(NULL));
printf("mktime_test: %d\n", ret);
return ret;
}
Reply to: