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: Eli Zaretskii
Subject: Re: [bug-gawk] strftime default format: %Z not void if not exandable
Date: Sat, 29 Jul 2017 12:20:22 +0300

> 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.



reply via email to

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