delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/08/01/09:27:24

X-Spam-Check-By: sourceware.org
Date: Wed, 1 Aug 2007 15:26:57 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: tcsh 6.15.00 TZ environmental variable - unexpected behaviour.
Message-ID: <20070801132657.GE13674@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <OF7499AB85 DOT F194E062-ON8025732A DOT 003C45FA-8025732A DOT 003D4F0C AT dstsystems DOT com>
Mime-Version: 1.0
In-Reply-To: <OF7499AB85.F194E062-ON8025732A.003C45FA-8025732A.003D4F0C@dstsystems.com>
User-Agent: Mutt/1.4.2.2i
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Aug  1 12:09, roger DOT broadbent AT dstintl DOT com wrote:
> It appears that tcsh treats the "TZ" environmental variable in a special
> way - upon entry into tcsh, some commands see TZ as set. Using unsetenv to
> attempt to unset it is fruitless:
> 
>     bash-3.2$ unset TZ
>     bash-3.2$ printenv TZ
>     bash-3.2$ echo $TZ
> 
>     bash-3.2$ bash -c "printenv TZ"
>     bash-3.2$ tcsh
>     tcsh$ printenv TZ
>     tcsh$ echo $TZ
>     GMTST0GMTDT-1,M3.5.0/1,M10.5.0/2
>     tcsh$ bash -c "printenv TZ"
>     GMTST0GMTDT-1,M3.5.0/1,M10.5.0/2
>     tcsh$ unsetenv TZ
>     tcsh$ printenv TZ
>     tcsh$ echo $TZ
>     GMTST0GMTDT-1,M3.5.0/1,M10.5.0/2
>     tcsh$ bash -c "printenv TZ"
>     GMTST0GMTDT-1,M3.5.0/1,M10.5.0/2

It's not tcsh but Cygwin.  tcsh just happens to call tzset once in a
while, which, under Cygwin, sets the TZ environment variable.  This is
arguably wrong, since the tzset() function is per POSIX supposed to
*read* the TZ environment variable, but it doesn't set it.

I fixed that in Cygwin in CVS, but the patch will not make it into a
release for some time.  So, better find some workaround (like, for
instance, create wrapper scripts around your MSVC applications using
bash).

> All opinions expressed are my own [etc, etc, etc]

Disclaimers like that are against site policy, please see
http://sources.redhat.com/lists.html.


Thanks,
Corinna

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

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019