[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gawk] lint warning: mktime: at least one of the values is out of th
From: |
Hermann Peifer |
Subject: |
[bug-gawk] lint warning: mktime: at least one of the values is out of the default range |
Date: |
Wed, 05 Mar 2014 21:14:48 +0100 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
Hi,
I am getting lint warnings for 24 as hour value:
$ awk --lint 'BEGIN{mktime("2014 1 1 24 0 0")}'
awk: cmd. line:1: warning: `mktime' is a gawk extension
awk: cmd. line:1: warning: mktime: at least one of the values is out of
the default range
As far as I understand, ISO 8601 allows both 00 and 24 as hour value for
midnight and legal minute values are 00 to 59. Is there a (good) reason
why lint warnings are generated for hour=24 but not for minute=60 ?
Regards, Hermann
# Related snippet from builtin.c
if (do_lint /* Ready? Set! Go: */
&& ( (second < 0 || second > 60)
|| (minute < 0 || minute > 60)
|| (hour < 0 || hour > 23)
|| (day < 1 || day > 31)
|| (month < 1 || month > 12) ))
lintwarn(_("mktime: at least one of the values is out of the
default range"));
- [bug-gawk] lint warning: mktime: at least one of the values is out of the default range,
Hermann Peifer <=