From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9266 invoked by alias); 9 Jun 2011 17:39:39 -0000 Received: (qmail 9257 invoked by uid 22791); 9 Jun 2011 17:39:38 -0000 X-SWARE-Spam-Status: No, hits=0.5 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_YG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vw0-f43.google.com (HELO mail-vw0-f43.google.com) (209.85.212.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jun 2011 17:39:24 +0000 Received: by vws10 with SMTP id 10so1773994vws.2 for ; Thu, 09 Jun 2011 10:39:24 -0700 (PDT) Received: by 10.52.182.98 with SMTP id ed2mr1506454vdc.120.1307641164111; Thu, 09 Jun 2011 10:39:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.113.6 with HTTP; Thu, 9 Jun 2011 10:39:04 -0700 (PDT) In-Reply-To: <20110609094631.56364lzi64m7t4d3@messagerie.si.c-s.fr> References: <20110609094631.56364lzi64m7t4d3@messagerie.si.c-s.fr> From: Edward McGuire Date: Thu, 09 Jun 2011 17:39:00 -0000 Message-ID: Subject: Re: cygcheck's understanding of TZ To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-06/txt/msg00086.txt.bz2 On Thu, Jun 9, 2011 at 02:46, EXCOFFIER Denis wrote: > It seems that /usr/bin/cygcheck does not interpret TZ the same way > as /usr/bin/date does, in the case TZ is set to a file name > [snip] > jupiter% (setenv TZ /usr/share/zoneinfo/Europe/Monaco; date; cygdate) There are two standard syntaxes for TZ. One begins with a timezone name, the other begins with a colon (:). If you supply a colon, then the rest of the string is interpreted in an operating system specific manner. GNU interprets it as a pathname. And Cygwin uses GNU's time library. Na=C3=AFvely, I thought you might just lack a colon on the front of the pathname. I confirmed time(1) honors the pathname syntax. But cygcheck(1) mysteriously interprets all pathnames as GMT + 1 hour: $ TZ=3D:/usr/share/zoneinfo/US/Central cygcheck -s | head -3 | tail -1 Current System Time: Thu Jun 09 18:23:42 2011 $ TZ=3D:/usr/share/zoneinfo/Europe/Monaco cygcheck -s | head -3 | tail -1 Current System Time: Thu Jun 09 18:23:49 2011 $ TZ=3D:/usr/share/zoneinfo/GMT cygcheck -s | head -3 | tail -1 Current System Time: Thu Jun 09 18:23:56 2011 $ TZ=3D:/usr/share/zoneinfo/Asia/Calcutta cygcheck -s | head -3 | tail -1 Current System Time: Thu Jun 09 18:23:59 2011 It gets local time right: $ cygcheck -s | head -3 | tail -1 Current System Time: Thu Jun 09 12:25:04 2011 And it gets GMT right: $ TZ=3DGMT cygcheck -s | head -3 | tail -1 Current System Time: Thu Jun 09 17:31:32 2011 So cygcheck(1) is honoring TZ, but it trips over a pathname in a way that date(1) does not. Cheers, MetaEd -- 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