Mail Archives: djgpp/2000/12/15/05:31:26
> From: ftilley AT azstarnet DOT cyberbromo DOT com (Felix Tilley)
> Newsgroups: comp.os.msdos.djgpp
> Date: Fri, 15 Dec 2000 07:07:52 GMT
>
> This works fine under Linux Mandrake and some versions of HP-UX. It
> works under djgpp too, except for the GMT offsets. The strftime %z %Z
> formats do not appear to be uniform over the C/Unix/DOS/Linux
> environments.
That's because the %z format specifier is not part of the ANSI/ISO
C89 Standard. Each library implements %z as it sees fit.
> PROGRAM OUTPUT:
>
> FET>
> FET> ./a.out
> Fri, 15 Dec 2000 07:01:31 +000
> Fri, 15 Dec 2000 00:01:31 -000
> Fri, 15 Dec 2000 02:01:31 -000
> Fri, 15 Dec 2000 01:01:31 -000
> Thu, 14 Dec 2000 23:01:31 -000
> Fri, 15 Dec 2000 15:01:31 +288
> FET>
>
> All of the GMT offsets are wrong. Dates and times are correct, but
> the GMT offsets are wrong.
I cannot reproduce this. Your program works for me; here's the output
I get:
Fri, 15 Dec 2000 10:20:26 +0000 GMT
Fri, 15 Dec 2000 12:20:26 +7200 IST <--
Fri, 15 Dec 2000 05:20:26 -0000 EST
Fri, 15 Dec 2000 04:20:26 -0000 CST
Fri, 15 Dec 2000 02:20:26 -0000 PST
Fri, 15 Dec 2000 18:20:26 +28800 BST
What version of DJGPP do you have installed? Did you download, unzip,
and set up the djtzn203.zip archive? Make sure you have your TZ
environment variable set to the file in the zoneinfo directory which
is appropriate for your time zone. Also, make sure you have the
latest djtzn203.zip from SimTel.NET; the original v2.03 release had a
bug in the zoneinfo files.
- Raw text -