bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] strftime default format: %Z not void if not exandable


From: arnold
Subject: Re: [bug-gawk] strftime default format: %Z not void if not exandable
Date: Thu, 10 Aug 2017 02:54:33 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

See below.

Eli Zaretskii <address@hidden> wrote:

> > From: "Jannick" <address@hidden>
> > Date: Sat, 29 Jul 2017 10:21:34 +0200
> > 
> > the default format for strftime() refers to the time zone name or
> > abbreviation (%Z). Please see the relevant snip from main.c:
> > 
> >     /* default format for strftime(), available via PROCINFO */
> >     const char def_strftime_format[] = "%a %b %e %H:%M:%S %Z %Y";
> > 
> > The current version of the documentation claims that **no** characters are
> > emitted for %Z if no time zone is determinable. However my current gawk
> > version (Win10, cygwin's gawk 4.1.4) shows 'Sat Jul 29 10:19:45     2017'
> > which seems to imply that %Z is converted to some blanks. Since this looks a
> > bit odd, could this be amended by the following or alike to avoid changes to
> > all awk scripts and to be consistent with the documentation?
> > 
> > 1 - removing the %Z related blanks (is this related to the mktime() issue
> > currently discussed in another thread?) or
> > 2 - replacing %Z by %z by default
>
> The problem you see doesn't happen to me in the MinGW-compiled Gawk 4.1.4.
> I guess the version of strftime provided by Cygwin doesn't support %Z,
> and is not replaced b y the version in missing_d.  Maybe you should
> report this to the Cygwin maintainers, and in the meantime the Gawk
> build should be modified to use missing_d/strftime.c in the Cygwin
> build.

It may be an issue with your time zone on Cygwin. On my work box, running
64 bit cygwin I get:

        $ gawk 'BEGIN { print strftime() }'
        Thu Aug 10 11:52:40 IDT 2017

As you can see, there is a time zone name for me.

In any case, please take this to the Cygwin list; I don't think
it's a gawk problem.

Thanks,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]