delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
Date: | Thu, 30 Dec 2004 05:52:27 -0700 |
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca> |
Subject: | Re: strftime patch |
In-reply-to: | <200412301203.iBUC3DDf022426@speedy.ludd.ltu.se> |
To: | djgpp-workers AT delorie DOT com |
Message-id: | <8ot7t0pskgfe03p1ii3l2gfvr0guvc0plf@4ax.com> |
Organization: | Systematic Software |
MIME-version: | 1.0 |
X-Mailer: | Forte Agent 1.93/32.576 English (American) |
References: | <200412301203 DOT iBUC3DDf022426 AT speedy DOT ludd DOT ltu DOT se> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id iBUCqTI5016668 |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
On Thu, 30 Dec 2004 13:03:13 +0100 (CET), ams AT ludd DOT ltu DOT se wrote: >I'm getting failures from the strftim* test programs. OS WINDOWS 98 >English, Swedish "Regional settings". djtz*.zip NOT installed. No >(what I think is) relevant environment variables set (LANG, LC_ALL, >TZ). > >My (lack of) setup might very well why it fails, but if something >are necessary for correct functioning the program should verify that. > >strftime: > fmt: "%Z " expected: "GMT" > got: "" > > fmt: "%z " expected: "+0000" > got: "" Should work correctly as putenv(unconst("TZ=GMT0",char*) used! Myabe should add putenv()/getenv() test comparison or switch to using setenv() as below? >strftimt: > test 10 error FAILED expected '2000-01-05 17:41:01 UTC' > actual '2000-01-05 17:41:01 ' > > test 11 error FAILED expected '2000-01-05 17:41:01 +0000' > actual '2000-01-05 17:41:01 ' > > test 32 error FAILED expected '01.08.2000 05:06:07 CEST' > actual '01.08.2000 05:06:07 EDT' > > test 33 error FAILED expected '01.08.2000 05:06:07 +0200' > actual '01.08.2000 05:06:07 -0400' >tests 33 errors 4 passed 29 These tests currently assume tz files installed, could change to using TZ variable as in strftime test program and strftimt test 31. But I don't understand why strftime test program failed but strftimt test 31 passed? Only difference seems to be use of setenv() instead of putenv() but either should give the same result. Could try patching strftime test program to use setenv() instead of putenv() and specify normal TZ env vars in strftimt. I think I should first check out what the library is doing when there are no files or env vars.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |