time/ISO8601: don't use glibc extension in strptime.
Per the manual for strptime, %F is equivalent %Y-%m-%d, so use that directly.
This commit is contained in:

committed by
Max Kellermann

parent
c95e3dc065
commit
8d80280ab9
@@ -185,7 +185,7 @@ ParseISO8601(const char *s)
|
||||
struct tm tm{};
|
||||
|
||||
/* 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);
|
||||
|
Reference in New Issue
Block a user