According to J. op den Brouw:
> What do I do wrong? htdump doesn't do anything:
>
> [msql@chaos bin]$ htdump -vvvvvvvvvv -c ../conf/htdig.conf
> [msql@chaos bin]$
htdump puts the text database in db.docs, not on the standard output.
According to J. op den Brouw:
> Okay, problem solved. On my HP-UX, the strptime function doesn't
> recognize the loose_<format>'s. If I set it to <format> (in this
> case it was RFC1123), it works like a charm.
>
> So what to do now? Is strptime of HP-UX broken or can we just
> implement <format> instead of loos_<format>. What's the reason
> for loose_<format> anyway?
>
> Let me hear quick, it's 3 PM already here.
Well, I guess we didn't make your deadline. :-) Nothing with the
3.2 betas is really an emergency, though, especially if your fix works
for you.
However, the reason for the LOOSE_* formats is because some HTTP servers
are pretty loose in the format in which they output dates. Some leave
off the weekday and/or the timezone, neither of which we should really
need to get the complete date, so we need to be flexible enough to allow
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.
It's hard to say for sure that your strptime() is buggy. Have you
ruled out a problem with timegm()? The date conversion is a two stage
process. First, strptime() converts the string into a "tm" structure,
then timegm() converts the tm struct into a time_t value. You end up
with a time_t value of 0, which indicates a problem with one or the other
stages of conversion, but without a trace print in between to show the
intermediate tm values, it's hard to say for sure where the problem is.
I believe the trace prints you showed in your earlier e-mail all end up
doing a new conversion from the already 0 time_t to a new tm structure,
and don't show the intermediate results of the conversion.
If the intermediate tm structure values are OK, the problem is in
timegm(), and it would be useful to know the value of HAVE_TIMEGM on
your system. On the other hand, if the tm structure values are wrong,
it would point to a problem in strptime(), but it might help to know which
tm fields are wrong, as well as the value of HAVE_STRPTIME on your 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