bug-gawk
[Top][All Lists]
Advanced

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

[bug-gawk] Gawk manual: 9.1.5 Time Functions, strftime([format [, timest


From: Hermann Peifer
Subject: [bug-gawk] Gawk manual: 9.1.5 Time Functions, strftime([format [, timestamp [, utc-flag]]])
Date: Sat, 02 Feb 2013 00:25:48 -0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

Hi,

The definition of the strftime() function states:

> If no format argument is supplied, strftime() uses
> the value of PROCINFO["strftime"] as the format string

This made me think that print strftime(1359771050) should result into something like "Sat Feb 2 00:10:50 BRST 2013", as PROCINFO["strftime"] is indeed "%a %b %e %H:%M:%S %Z %Y".

However, this does not work as I expected. There is a lint warning about a "non-string first argument", see below. Am I misinterpreting the manual or overlooking something?

Regards, Hermann


> awk --lint 'BEGIN{ print strftime(1359771050)}'
awk: cmd. line:1: warning: `strftime' is a gawk extension
awk: cmd. line:1: warning: strftime: received non-string first argument
1359771050




reply via email to

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