sfeed.c: separator T could be lowercase - sfeed - RSS and Atom parser | |
git clone git://git.codemadness.org/sfeed | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 19957bc272e745af7b56b79fa648e8b6b77113b1 | |
parent 1f6dfac83e8325a42dc5faa2e31cc25593acdfc8 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Thu, 4 Jul 2024 18:26:51 +0200 | |
sfeed.c: separator T could be lowercase | |
From RFC3339: | |
5.6. Internet Date/Time Format | |
" | |
[...] | |
NOTE: Per [ABNF] and ISO8601, the "T" and "Z" characters in this | |
syntax may alternatively be lower case "t" or "z" respectively. | |
This date/time format may be used in some environments or contexts | |
that distinguish between the upper- and lower-case letters 'A'-'Z' | |
and 'a'-'z' (e.g. XML). Specifications that use this format in | |
such environments MAY further limit the date/time syntax so that | |
the letters 'T' and 'Z' used in the date/time syntax must always | |
be upper case. Applications that generate this format SHOULD use | |
upper case letters. | |
" | |
Reference: https://www.rfc-editor.org/rfc/rfc3339 | |
Diffstat: | |
M sfeed.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/sfeed.c b/sfeed.c | |
@@ -646,7 +646,7 @@ parsetime(const char *s, long long *tp) | |
va[vi] = v; | |
if ((vi < 2 && *s == '-') || | |
- (vi == 2 && (*s == 'T' || ISSPACE((unsigned char)*s))) || | |
+ (vi == 2 && (*s == 'T' || *s == 't' || ISSPACE((unsigned c… | |
(vi > 2 && *s == ':')) | |
s++; | |
} |