Date: Fri, 15 Dec 2000 12:24:31 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: ftilley AT azstarnet DOT cyberbromo DOT com (Felix Tilley) Message-Id: <1438-Fri15Dec2000122431+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: <3a39c060.1329770@corp.supernews.net> (ftilley AT azstarnet DOT cyberbromo DOT com) Subject: Re: strftime: Need Help with Time Offsets References: <3a39c060 DOT 1329770 AT corp DOT supernews DOT net> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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.