commit 1742c5e687cf6974c1c9c46e045291f879a79e27
parent 87aafd5d45f064412ff977e4045b7f603ba092c6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Wed, 19 Jan 2022 19:28:02 +0100
sfeed: parsetime: allow leap second like 23:59:60
Specified in RFC2822 Section 3.3. Date and Time Specification
"[...] the time-of-day MUST be in the range 00:00:00 through 23:59:60 (the
number of seconds allowing for a leap second; see [STD12]) [...]"
To test:
<entry><updated>2016-12-31T23:59:60Z</updated></entry>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sfeed.c b/sfeed.c
@@ -647,7 +647,7 @@ parsetime(const char *s, time_t *tp)
va[2] < 1 || va[2] > 31 ||
va[3] < 0 || va[3] > 23 ||
va[4] < 0 || va[4] > 59 ||
- va[5] < 0 || va[5] > 59)
+ va[5] < 0 || va[5] > 60) /* allow leap second */
return -1;
if (tp)