Introduction
Introduction Statistics Contact Development Disclaimer Help
sfeed.c: support , for decimal fractions - sfeed - RSS and Atom parser
git clone git://git.codemadness.org/sfeed
Log
Files
Refs
README
LICENSE
---
commit a57e31efc26780e2079d336ea46c7e0776ec42e2
parent 5f373b2b7aed3f569dc97c2c42aab2aa6f3324bf
Author: Hiltjo Posthuma <[email protected]>
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:
M sfeed.c | 2 +-
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++)
;
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.