W3C home > Mailing lists > Public > www-lib@w3.org > April to June 1998

Re: MC status of libwww version 5.1b

From: Henrik Frystyk Nielsen <frystyk@w3.org>
Date: Wed, 01 Apr 1998 10:16:10 -0800
Message-Id: <3.0.5.32.19980401101610.008974f0@localhost>
To: l_triches@effix.fr, www-lib@w3.org
At 10:35 04/01/98 +0200, Laurent TRICHES wrote:

>> 2) And in an other line there is a sprintf with 19%2d. I have replace it
with a
>> %4d and a function which return us the year on 4 digits.
>> .
>> Could you please give me a solution for the first notes.
>> .

There indeed is a problem here but the code is not likely to be exercised
very much as it only runs if strftime isn't available. However, it is a
bug, and your fix is also correct. Just to make it clear, I have included
the patch below to HTWWWStr.c, RCS version 2.23.

Thanks,

Henrik

diff -r2.23 HTWWWStr.c
500c500
<       sprintf(buf,"%s, %02d %s 19%02d %02d:%02d:%02d",
---
>       sprintf(buf,"%s, %02d %s %04d %02d:%02d:%02d",
504c504
<               loctime->tm_year % 100,
---
>               loctime->tm_year + 1900,
515c515
<       sprintf(buf,"%s, %02d %s 19%02d %02d:%02d:%02d GMT",
---
>       sprintf(buf,"%s, %02d %s %04d %02d:%02d:%02d GMT",
519c519
<               gmt->tm_year % 100,
---
>               gmt->tm_year + 1900,

--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk
Received on Wednesday, 1 April 1998 13:18:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:27 GMT