X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Sun, 4 Mar 2012 12:52:32 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Setting TZ may break time() in non-Cygwin programs
Message-ID: <20120304115232.GC18852@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4F4FD8C6.5000807@t-online.de> <20120302091317.GD14404@calimero.vinschen.de> <4F513D11.2080203@t-online.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <4F513D11.2080203@t-online.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Mar  2 22:35, Christian Franke wrote:
> Corinna Vinschen wrote:
> >On Mar  1 21:15, Christian Franke wrote:
> >>TZ environment variable is set by default since base-files 4.0.7.
> >>
> >>Unfortunately this breaks the time() calculation for all non-Cygwin
> >>programs run from Cygwin if Microsoft C runtime (mscrt*.dll) is
> >>used. MS CRT evaluates TZ but supports only a very old syntax
> >>subset. IIRC this is the case since VS1.x (DOS/Win16) and did not
> >>change since at least VS10.
> >I'm sorry, but I really don't care enough.  If that's a problem, then
> >just unset TZ in your environment before calling non-Cygwin tools, no?
> 
> Of course, after tracking down the problem to the new TZ it is now
> easy to unset it :-)
> 
> No problem in scripts, but inconvenient and error prone for interactive use.
> 
> 
> >But, as usual, PTC.
> 
> OK, ...
> 
> >
> >Simple: Unset TZ for Win32 programs run from Cygwin.
> >
> >More flexible: Set (unset) TZ=CYGWIN_WINENV_TZ if this variable is
> >set (to empty). Otherwise keep TZ as is.
> >
> 
> would a patch for any of the above have a chance to get accepted?

If it's not getting too complicated, yes.  However, the second idea
I don't understand.  Can you explain this differently?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

