This is the mail archive of the cygwin-patches mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Setting TZ may break time() in non-Cygwin programs

On Tue, Apr 17, 2012 at 10:37:18PM +0200, Christian Franke wrote:
>Christopher Faylor wrote:
>> On Tue, Apr 17, 2012 at 09:06:15AM +0200, Corinna Vinschen wrote:
>>> On Apr 11 20:52, Christian Franke wrote:
>>>> Yes. Patch is attached.
>>>> Christian
>>> Thanks for the patch.  I'm just wondering if we shouldn't generalize
>>> this right from the start by keeping an array of variables to skip
>>> when starting native apps and a function to handle this, along the
>>> lines of the getwinenv function and the conv_envvars array.
>>> It might only contain TZ now, but there's always a chance we suddenly
>>> stumble over a similar problem, isn't it?
>> I really hate having Cygwin be "smart" like this.  It seems like it's
>> asking for a follow-on "How do I set TZ for my Windoze program???"
>> email, followed by a "We need a CYGWIN environment variable option!"
>> What's the problem with just unsetting TZ again?  Yes, I know you
>> have to remember to do it but does this affect enough programs that
>> we need to add even more head standing code in Cygwin to accommodate
>> it.
>It affects all C/C++ programs which use time() and friends from any 
>version of MSVCRT as DLL or static library.

I understand that it affects programs which use time() but the Cygwin
mailing list isn't filled with complaints about TZ being wrong for
Windows programs.  And, if we always unset it that means that these
time() using programs can never ever use the TZ environment variable.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]