Mail Archives: djgpp/2000/12/21/04:11:19
On Wed, 20 Dec 2000, Jason Green wrote:
> ftilley AT azstarnet DOT cyberbromo DOT com (Felix Tilley) wrote:
>
> > All of the GMT offsets are wrong. Dates and times are correct, but
> > the GMT offsets are wrong.
>
> There appears to be a bug in strftime() when using the %z format.
The bug, whether it exists or not, does not necessarily have anything
to do with what Felix reported: I replied to his message saying I
cannot reproduce the problem. His test program wroked for me. I
suspect Felix was using an old djtzn203.zip, where timezone files were
corrupted.
> Well, actually not so much a bug as a feature. ;-)
Actually, %z is undocumented and should not be used at all in the
DJGPP version of strftime.
> With existing strftime the test program outputs:
>
> Wed, 20 Dec 2000 20:35:42 +0000 GMT
> Wed, 20 Dec 2000 20:35:42 +0000 GMT
> Wed, 20 Dec 2000 08:01:42 -0000 TEST1
> Thu, 21 Dec 2000 09:09:42 +45240 TEST2
>
> After patching the test program outputs:
>
> Wed, 20 Dec 2000 20:36:21 +0000 GMT
> Wed, 20 Dec 2000 20:36:21 +0000 GMT
> Wed, 20 Dec 2000 08:02:21 -1234 TEST1
> Thu, 21 Dec 2000 09:10:21 +1234 TEST2
Note that your changes modified the bahavior of %z: it is supposed to
print the values in seconds, while your version prints it in hours and
minutes instead. So this is more than just a bugfix for the negative
offsets.
> Here is the patch:
Thanks.
- Raw text -