Module Name: src
Committed By: ginsbach
Date: Mon Sep 21 15:31:54 UTC 2020
Modified Files:
src/lib/libc/time: strptime.c
Log Message:
Correct range for ISO week conversion
The %V conversion range for strptime(3) should match the strftime(3)
conversion range. A valid ISO week is 1-53.
To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/lib/libc/time/strptime.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/time/strptime.c
diff -u src/lib/libc/time/strptime.c:1.62 src/lib/libc/time/strptime.c:1.63
--- src/lib/libc/time/strptime.c:1.62 Thu Aug 24 01:01:09 2017
+++ src/lib/libc/time/strptime.c Mon Sep 21 15:31:54 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: strptime.c,v 1.62 2017/08/24 01:01:09 ginsbach Exp $ */
+/* $NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 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.62 2017/08/24 01:01:09 ginsbach Exp $");
+__RCSID("$NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $");
#endif
#include "namespace.h"
@@ -424,7 +424,7 @@ literal:
continue;
case 'V': /* The ISO 8601:1988 week number as decimal */
- bp = conv_num(bp, &i, 0, 53);
+ bp = conv_num(bp, &i, 1, 53);
continue;
case 'Y': /* The year. */