X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 14 Apr 2009 14:11:39 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: gawk strftime '%z' format not reporting correct offset from UTC Message-ID: <20090414121139.GV15443@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <1770775685 DOT 420301237903192908 DOT JavaMail DOT root AT pat DOT ae-solutions DOT com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1770775685.420301237903192908.JavaMail.root@pat.ae-solutions.com> User-Agent: Mutt/1.5.19 (2009-02-20) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Mar 24 08:59, Richard Narum wrote: > >On Mar 23 16:00, Richard Narum wrote: > >> Package Version Status > >> tzcode 2008h-1 OK > >> $ date --version > >> date (GNU coreutils) 6.10 > >> $ gawk --version > >> GNU Awk 3.1.6 > >> $ export TZ=America/Chicago > >> $ date --date='8 Mar 2009' +'%c %z %Z' > >> Sun Mar 8 00:00:00 2009 -0600 CST > >> $ date --date='9 Mar 2009' +'%c %z %Z' > >> Mon Mar 9 00:00:00 2009 -0500 CDT > >> $ gawk 'BEGIN{print strftime("%c %z %Z",mktime("2009 3 8 0 0 0"))}' > >> Sun Mar 8 00:00:00 2009 +0000 CST > >> $ gawk 'BEGIN{print strftime("%c %z %Z",mktime("2009 3 9 0 0 0"))}' > >> Mon Mar 9 00:00:00 2009 +0000 CDT > > > >AFAICS, it's the "modern" style of TZ which isn't handled by the > >internal time functions. Unsetting TZ should work, though. Or set it > >to TZ=CST-5CDT > > > > > >Corinna > > > >-- > >Corinna Vinschen Please, send mails regarding Cygwin to > >Cygwin Project Co-Leader cygwin AT cygwin DOT com > >Red Hat > > Thanks Corinna, this gets me over my hump. I've used CST6CDT in the > past and if I try it now it doesn't work either, only if I add the '+' > or '-' symbol, i.e. CST+6CDT. It seems to me that there might still > be something wrong on my Cygwin side because things aren't consistent > with Linux. It took some time but now I tracked this down, finally. The problem is a bug in Cygwin's tzset() function. I fixed that in CVS. Now TZ="CST6CDT" as well as TZ="America/Chicago" works as expected. The patch will be in the next Cygwin 1.7 test release, 1.7.0-46. Thanks for the report, 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/