Mail Archives: djgpp/2004/03/06/10:01:14
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | Cesar Rabak <crabak AT acm DOT org>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: TZ in DJGPP versus *other environments*
|
Date: | Sat, 06 Mar 2004 11:58:55 -0300
|
Lines: | 42
|
Message-ID: | <4049E72F.2000509@acm.org>
|
References: | <oJa2c.14365$lc DOT 26104 AT jagger DOT tie DOT cl>
|
NNTP-Posting-Host: | 200.234.26.192
|
Mime-Version: | 1.0
|
X-Trace: | news.uni-berlin.de 1078585135 60219166 I 200.234.26.192 ([39218])
|
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.0.2) Gecko/20030208 Netscape/7.02
|
X-Accept-Language: | pt-br, pt
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Ludoviko++ escreveu:
> Hi there.
> I have a question related to the need of DJGP-"localtime" and other
> time-related functions for a set of files.
>
> I've installed the corresponding "zoneinfo" files for my own time zone
> (Chilean GMT-4), so both localtime and gmtime give me the correct answer
> now - before installing the package, both returned the same hour, ie: "I am
> _in_ GMT timezone" -. Also, DJGPP was not capable of recognizing DST, thus I
> was always one (extra) hour in summer.
> Now I've installed the files and set the TZ environment to point to a file
> which is the corresponding timezone info (zoneinfo/chile/continental), and
> DJGPP programs get the time correct.
>
> But, because of having TZ set to a file, other environments that rely on TZ
> (such as Turbo C++ set and Visual Studio 6 set) give me now the _wrong_
> time, the same I had before installing the zoneinfo package. MSDN
[snipped]
> Is there any solution for this? Reentrant, independent of "shared" system
> information (such as environment variables) solutions would be greatly
> apreciated.
>
I think there is one based on the DJGPP.ENV.
Put the TZ variable there without the '+' which normally is used for
system wide environment variables.
This will solve the problem for DJGPP compiled programs. For the users
of the compiled programs you'll need to test if it's necessary to add a
single section for you program and take out the remaining of the entries.
Do not forget to put in the installation instructions of your program
the need to have the env var pointing to DJGPP.ENV!
HTH
--
Cesar Rabak
- Raw text -