According to J. op den Brouw:
> > these.  The LOOSE_* formats are correct, and the tm structure given to
> > strptime() is static, and therefore its fields have an initial value and
> > not random garbage.  So, I don't see an obvious bug anywhere.
> 
> Well, this server disn't (apache). This initial value is obviously set
> to 01-01-1970.

Not quite.  The initial value is all zeros in all tm fields, which
doesn't correspond to a valid date, but doesn't (or shouldn't) cause
grief for timegm() if some fields aren't filled in by strptime().
This was a problem in older 3.1.x versions, because the tm structure
was automatic rather than static, and so it had random garbage in some
fields which sometimes caused timegm() to crash.  Shouldn't happen in 3.2.

The date of 01-01-1970 corresponds to a time_t value of 0, but what we
need to clarify is whether the time_t value we get on your system is 0
because timegm() has problems with inconsistent fields like weekday and
timezone in the tm structure, or whether other tm fields are incorrect.
Seeing all the intermediate tm fields, between the strptime() and
timegm(), would help us see which of the two functions is failing on
your system.  Knowing whether HAVE_STRPTIME and HAVE_TIMEGM are defined
in your include/htconfig.h will tell us if the problem function is ours
or in your C library.

It might also be helpful to know if you get the same problem with the
3.1.6 snapshot on this system.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

_______________________________________________
htdig-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to