[tz] [PATCH 4/7] Allow 24:00 at the end of version-2-format time zone files.

Paul Eggert eggert at cs.ucla.edu
Thu Feb 21 07:54:52 UTC 2013


* zic.c (stringoffset): Allow 24:00.  POSIX.1-2008 allows 24:00,
even though older versions of POSIX maxed out at 23:59:59.
Patch from Arthur David Olson.
---
 zic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/zic.c b/zic.c
index 806e613..91f0d20 100644
--- a/zic.c
+++ b/zic.c
@@ -1748,7 +1748,7 @@ stringoffset(char *result, long offset)
 	minutes = offset % MINSPERHOUR;
 	offset /= MINSPERHOUR;
 	hours = offset;
-	if (hours >= HOURSPERDAY) {
+	if (hours > HOURSPERDAY) {
 		result[0] = '\0';
 		return -1;
 	}
-- 
1.7.10.4




More information about the tz mailing list