summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorginsbach <ginsbach@NetBSD.org>2015-10-30 03:18:10 +0000
committerginsbach <ginsbach@NetBSD.org>2015-10-30 03:18:10 +0000
commitc6b3ceb980ad68d3bc7d64c6406bfdbd2fdf8b0c (patch)
tree79474819ff0eaca343012882a5508725efde53e0 /lib
parent314033f54b36b677e333e6767cdad7ba3f8351ab (diff)
ISO 8601 and RFC 3339 specify that an offset can be up to 23:59 and
not 12:00 east/west. Just proves that one shouldn't use other implementations as a canonical reference. Thanks to all who pointed this out.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/time/strptime.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/time/strptime.c b/lib/libc/time/strptime.c
index 9820bdcc166..5a2471bfc4b 100644
--- a/lib/libc/time/strptime.c
+++ b/lib/libc/time/strptime.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $ */
+/* $NetBSD: strptime.c,v 1.53 2015/10/30 03:18:10 ginsbach Exp $ */
/*-
* Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: strptime.c,v 1.52 2015/10/30 01:49:36 ginsbach Exp $");
+__RCSID("$NetBSD: strptime.c,v 1.53 2015/10/30 03:18:10 ginsbach Exp $");
#endif
#include "namespace.h"
@@ -626,7 +626,7 @@ loadzone:
default:
return NULL;
}
- if (offs > (12 * SECSPERHOUR))
+ if (offs >= (HOURSPERDAY * SECSPERHOUR))
return NULL;
if (neg)
offs = -offs;