25 lines
813 B
Diff
25 lines
813 B
Diff
|
From 634bd4798c4dab00f0a0869fed9a4f31bfbd53fa Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
|
||
|
Date: Thu, 25 Feb 2021 13:53:31 -0300
|
||
|
Subject: [PATCH] time/ISO8601: don't use glibc extension in strptime.
|
||
|
|
||
|
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that
|
||
|
directly.
|
||
|
---
|
||
|
src/time/ISO8601.cxx | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/time/ISO8601.cxx b/src/time/ISO8601.cxx
|
||
|
index e2197e3ad..be20ee803 100644
|
||
|
--- a/src/time/ISO8601.cxx
|
||
|
+++ b/src/time/ISO8601.cxx
|
||
|
@@ -202,7 +202,7 @@ ParseISO8601(const char *s)
|
||
|
}
|
||
|
|
||
|
/* parse the date */
|
||
|
- const char *end = strptime(s, "%F", &tm);
|
||
|
+ const char *end = strptime(s, "%Y-%m-%d", &tm);
|
||
|
if (end == nullptr) {
|
||
|
/* try without field separators */
|
||
|
end = strptime(s, "%Y%m%d", &tm);
|