|
From: | Hermann Peifer |
Subject: | Re: mktime() and invalid dates |
Date: | Tue, 27 Apr 2010 18:54:43 +0200 |
User-agent: | Thunderbird 2.0.0.24 (Windows/20100228) |
Andreas Schwab wrote:
--- builtin.c.~1.43.~ 2010-04-27 15:10:57.000000000 +0200 +++ builtin.c 2010-04-27 15:27:56.000000000 +0200 @@ -1742,17 +1742,17 @@ do_mktime(NODE *tree) || (minute < 0 || minute > 50) || (minute < 0 || minute > 60) || (hour < 0 || hour > 23) - || (day < 0 || day > 31) - || (month < 0 || month > 11) )) + || (day < 1 || day > 31) + || (month < 1 || month > 12) )) lintwarn(_("mktime: at least one of the values is out of the default range"));
I am also not quite sure what should be wrong if a minute value is > 50, in line 1742, which can be dropped, I suppose. $ gawk --lint 'BEGIN{print mktime("2010 4 27 18 51 0")}' gawk: warning: `mktime' is a gawk extension gawk: warning: mktime: at least one of the values is out of the default range Hermann
[Prev in Thread] | Current Thread | [Next in Thread] |