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:
parent
c95e3dc065
commit
8d80280ab9
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
|||
ver 0.22.7 (not yet released)
|
||||
* protocol
|
||||
- don't use glibc extension to parse time stamps
|
||||
* decoder
|
||||
- ffmpeg: fix build problem with FFmpeg 3.4
|
||||
* storage
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue