commit a57e31efc26780e2079d336ea46c7e0776ec42e2
parent 5f373b2b7aed3f569dc97c2c42aab2aa6f3324bf
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 20 Nov 2024 19:59:15 +0100
sfeed.c: support , for decimal fractions
- ISO8601 allows a comma for decimal fractions.
- RFC3339 specifies "." (but also references ISO8601).
In particular this fixes parsing timezones after decimal fractions:
1985-04-12 23:20:50,5+04:00
Would ignore the timezone, but is now supported.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sfeed.c b/sfeed.c
@@ -652,7 +652,7 @@ parsetime(const char *s, long long *tp)
}
/* skip milliseconds in for example: "%Y-%m-%dT%H:%M:%S.000Z" */
- if (*s == '.') {
+ if (*s == '.' || *s == ',') {
for (s++; ISDIGIT((unsigned char)*s); s++)
;
}