aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2021-09-26 20:57:58 +0300
committerArnold D. Robbins <arnold@skeeve.com>2021-09-26 20:57:58 +0300
commit990e051072904d4cbb1d8538ad699f0ec2cfc208 (patch)
tree76176dae1f2ddbee30c319a2990ffa00a7007946
parent94fc436db2a2667152575a3d3cf5662e6e37d303 (diff)
parentf597ee8f9ac128f88f85639ffbce6d7248776f75 (diff)
downloadegawk-990e051072904d4cbb1d8538ad699f0ec2cfc208.tar.gz
egawk-990e051072904d4cbb1d8538ad699f0ec2cfc208.tar.bz2
egawk-990e051072904d4cbb1d8538ad699f0ec2cfc208.zip
Merge branch 'gawk-5.1-stable'
-rw-r--r--ChangeLog5
-rw-r--r--builtin.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d72b593..36b37c35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-09-26 Arnold D. Robbins <arnold@skeeve.com>
+
+ * builtin.c (do_mktime): Update that ISO 8601 does not allow
+ hours > 23. Thanks to Nethox <nethox+awk@gmail.com> for the info.
+
2021-09-23 Arnold D. Robbins <arnold@skeeve.com>
* gawkapi.h: Some clean-up of comments in the header file.
diff --git a/builtin.c b/builtin.c
index 56334417..c27b5081 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2121,10 +2121,12 @@ do_mktime(int nargs)
& hour, & minute, & second,
& dst);
+ // 9/2021: I've been told that according to the ISO 8601-1:2019 spec,
+ // hour cannot be 24. So the check for hour > 23 is valid.
if ( do_lint /* Ready? Set! Go: */
&& ( (second < 0 || second > 60)
|| (minute < 0 || minute > 59)
- || (hour < 0 || hour > 23) /* FIXME ISO 8601 allows 24 ? */
+ || (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"));