Rodent of Unusual Size wrote:
is it just me, or is there something legitimately wrong here:



#include <time.h>
#include "apr.h"
#include "apr_time.h"
#include <stdio.h>

int main(int argc, char *argvp[])
{
    apr_time_exp_t lt;
    apr_time_exp_lt(&lt, (apr_time_now() / APR_USEC_PER_SEC));
    printf("is_dst=%d\n", lt.tm_isdst);
    return 0;
}


$ date Fri Jun 11 14:38:16 EDT 2004 $ ./x is_dst=0

#include <time.h> #include "apr.h" #include "apr_time.h" #include <stdio.h>

int main(int argc, char *argvp[])
{
    apr_time_exp_t lt;
    apr_time_exp_lt(&lt, apr_time_now() / APR_USEC_PER_SEC);
    printf("%04d/%02d/%02d   is_dst=%d\n",
           1900+lt.tm_year, 1+lt.tm_mon, 0+lt.tm_mday, lt.tm_isdst);
    apr_time_exp_lt(&lt, apr_time_now());
    printf("%04d/%02d/%02d   is_dst=%d\n",
           1900+lt.tm_year, 1+lt.tm_mon, 0+lt.tm_mday, lt.tm_isdst);
    return 0;
}

$ ./tt
1969/12/31   is_dst=0
2004/06/12   is_dst=1



Reply via email to