Time parsing is wrong?

Hi,

I have added code to HTTPReq.c to HTTPMakeRequest to get time zone and to print
the converted timestring:

        ...

   if (request_mask & HT_C_IMS) {
        time_t lm = 0;
        lm = HTAnchor_lastModified(anchor);
        if (PROT_TRACE) HTTrace("HTTP........!!!!!!! If-Modified-Since, 1,  lm
= %d\n", lm);
        
        if (lm > 0) {
            if (PROT_TRACE) { 
                time_t t = 0; 
                t = HTGetTimeZoneOffset();
                fprintf(stderr, "Timezone offset is %ld secunds or %ld
hours\n", t, t/3600);
            }
            
            PUTS("If-Modified-Since: ");
            PUTS(HTDateTimeStr(&lm, NO));
            PUTBLOCK(crlf, 2);
            if (PROT_TRACE) HTTrace("HTTP........!!!!!! If-Modified-Since, 2, 
lm = %d, timestr = %s\n", lm, HTDateTimeStr(&lm, NO));
        }
    }


And there is corresponding place in trace:


HTTP_CONNECTED, HTEvent_WRITE: ===== Flushing request ===
HTTP........!!!!!!! If-Modified-Since, 1,  lm = 917361129
Timezone offset is -21600 secunds or -6 hours
HTTP........!!!!!! If-Modified-Since, 2,  lm = 917361129, timestr = Tue, 26 Jan
1999 14:32:09 GMT
HTTP........ Generating HTTP/1.x Request Headers
HTTP........ Generating General Headers
Buffer...... Flushing 10010338
Write Socket 227 bytes written to 10
HTTP_CONNECTED, HTEvent_READ: ===== Calling HTHost_read ===


Thanks,

Olga.


----------------------------------
E-Mail: olga <olga@eai.com>
Date: 27-Jan-99
Time: 10:08:23

This message was sent by XFMail
----------------------------------

Received on Wednesday, 27 January 1999 11:11:12 UTC