According to David_Bourne:
> > > > Arrgh! Sorry, my fault. I introduced new date parsing code in htdig
> >> > a couple months ago, and I thought I had tested it but evidently not
> >> > well enough. On line 1142 of htdig/Retriever.cc, change the line:
> >> >
> >> > while (isspace(*s))
> >> >
> >> > to:
> >> >
> >> > while (*s == '-' || isspace(*s))
> >> > ----
> >>
> >> Good point, Bill. I just remembered this morning that I should have
> >> pointed this out. David didn't explicitly mention whether he's using
> >> 3.1.6 or 3.2.0b4, but if it's the former, he can get the fix above
> > > as a patch at
>
> I'm using version 3.1.6
>
> I made the change to line 1142 and tested and then saw line 1127 with
> a similar construct so changed that too. ...
Line 1127 was just to skip leading spaces before the year. You're not
likely to have leading hyphens, but the change won't hurt anything.
Line 1142 was the one to change. It was just skipping over spaces after
the year, but not hyphens.
> I then did a ./configure, make and sudo make install (the sudo was
> needed to set permissions properly)
>
> With one or both lines 'patched' I still can't use 1990/01/01 but
> 1990 01 01 works.
The patch was to get the code to correctly handle an ISO-8601 format
date string, with hyphens, i.e. 1990-01-01. If you want it to allow
slashes too, you need to change lines 1142 and 1153 to:
while (*s == '-' || *s == '/' || isspace(*s))
which means while the current character is a hyphen, a slash, or a
white space character of some sort, keep skipping over.
> I notice that the returned date on the results page
> is shown as 12/31/89. Probably a time zone issue. I tried:
>
> <META Name="Date" Content="1990 01 01T12:00:00-6:00">
>
> without effect.
>
> Guess I'll play with the SSI side for a bit using spaces.
Yes, the problem is the meta date field is parsed in the UTC time zone,
and midnight UTC is assumed if no time is given, but htsearch displays
dates in the web server's local time zone. For zones west of the prime
meridian, dates will be one day less, because you're a few hours before
midnight in your time zone.
The quick fix for now is to use something like:
<meta name="date" content="1990-01-01 12:00:00">
which will work as long as you're no more than 12 hours west of UTC (and
no more than 11:30 east of UTC). Eventually, I think the fix will be to
parse the meta date field in the local time zone on the indexing machine,
which hopefully will be in the same time zone as the machine on which
htsearch is run. Usually it's the same machine anyway, but not always.
In the case where it's not, you can always change the TZ environment
variable for the htdig or htsearch process.
--
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-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html