According to Geoff Hutchison:
> On Mon, 5 Feb 2001, Gilles Detillieux wrote:
> > timezone (or possible lack thereof) from the HTTP headers.  The 3.1.x
> > code didn't have any %Z format string in its date parsing, so it seems
> 
> Right, right. For some reason I was thinking of the htsearch date
> *output*, not the actual parsing in htdig.
> 
> I just fixed it in the CVS tree. Here's the patch.
...
>   //     RFC1123: Sun, 06 Nov 1994 08:49:37 GMT
> ! #define RFC1123_FORMAT "%a, %d %b %Y %H:%M:%S"
> ! #define LOOSE_RFC1123_FORMAT "%d %b %Y %H:%M:%S"
>   
>   //     RFC850 : Sunday, 06-Nov-94 08:49:37 GMT
> ! #define RFC850_FORMAT  "%A, %d-%b-%y %H:%M:%S"
> ! #define LOOSE_RFC850_FORMAT  "%d-%b-%y %H:%M:%S"
>   
>   //     ANSI C's asctime() format : Sun Nov  6 08:49:37 1994
>   #define ASCTIME_FORMAT  "%a %b %e %H:%M:%S %Y"
>   #define LOOSE_ASCTIME_FORMAT  "%b %e %H:%M:%S %Y"
>   
>   //      ISO8601 : 1994-11-06 08:49:37 GMT
> ! #define ISO8601_FORMAT "%Y-%m-%d %H:%M:%S"
>   
>   //      ISO8601 (short version): 1994-11-06
>   #define ISO8601_SHORT_FORMAT "%Y-%m-%d"

I guess my only concern is whether the GetRFC*() functions are supposed
to put out the timezone or not.  In any case, if they are, I don't think
they were necessarily putting out the correct timezone when local_time
is false.  It sounds like %Z is the current timezone, regardless of
whether the time is converted by localtime() or gmtime().

Right now, I think the only effect this will have on date output in the
ht://Dig programs is the If-Modified-Since header that htdig puts out.
In the 3.1.5 code, the format used is "%a, %d %h %Y %T GMT", while in
the 3.2 code RFC1123_FORMAT was "%a, %d %b %Y %H:%M:%S %Z", and is now
"%a, %d %b %Y %H:%M:%S", so the If-Modified-Since may have had the wrong
time zone code before, and won't have any time zone now.  Of course,
the "%h" in 3.1.5 is a deprecated form of "%b", which may have failed
on some systems, so that change was needed.  I have to wonder, though,
whether some web servers will be unhappy with the fact there's no time
zone specified after the time in this header.

Any suggested fixes for this?

-- 
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]
http://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to