| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-1.8 required=5.0 tests=BAYES_00,SARE_SUB_PCT_LETTER |
| X-Spam-Check-By: | sourceware.org |
| Date: | Mon, 23 Mar 2009 16:00:06 -0500 (CDT) |
| From: | Richard Narum <rnarum AT ae-solutions DOT com> |
| To: | cygwin AT cygwin DOT com |
| Message-ID: | <444718016.415531237842006607.JavaMail.root@pat.ae-solutions.com> |
| In-Reply-To: | <799129936.415411237841700686.JavaMail.root@pat.ae-solutions.com> |
| Subject: | gawk strftime '%z' format not reporting correct offset from UTC |
| MIME-Version: | 1.0 |
| 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 |
All,
I may have found a bug in the Cygwin version of gawk or maybe I'm missing s=
omething. =C2=A0As the information below depicts the GNU date '%z' format i=
s working but the '%z' format under gawk's strftime function is not reporti=
ng the correct offset from UTC for me. =C2=A0I've tested this on Linux and =
gawk is reporting correctly. Any suggestions would be greatly appreciated.=
=20=20
$ cat /proc/version=20
CYGWIN_NT-5.1 1.5.24(0.156/4/2) 2007-01-31 10:57=20
$ cygcheck -c tzcode=20
Cygwin Package Information=20
Package Version Status=20
tzcode 2008h-1 OK=20
$ date --version=20
date (GNU coreutils) 6.10=20
$ gawk --version=20
GNU Awk 3.1.6=20
$ export TZ=3DAmerica/Chicago=20
$ date --date=3D'8 Mar 2009' +'%c %z %Z'=20
Sun Mar 8 00:00:00 2009 -0600 CST=20
$ date --date=3D'9 Mar 2009' +'%c %z %Z'=20
Mon Mar 9 00:00:00 2009 -0500 CDT=20
$ gawk 'BEGIN{print strftime("%c %z %Z",mktime("2009 3 8 0 0 0"))}'=20
Sun Mar 8 00:00:00 2009 +0000 CST=20
$ gawk 'BEGIN{print strftime("%c %z %Z",mktime("2009 3 9 0 0 0"))}'=20
Mon Mar 9 00:00:00 2009 +0000 CDT=20
Thanks,
Richard Narum=20
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |