sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit c7739b9c04b4b49888e1161164b1cdac0d9930ca
parent 04db56ad05b207374c973b8651a6bfa14bbbac4b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 26 Mar 2023 18:03:24 +0200

sfeed.c: datetounix: simplify calculation and make it slightly easier to read

This also fixes a calculation (possibly a compiler bug) with Open Watcom 1.9.

Diffstat:
Msfeed.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sfeed.c b/sfeed.c @@ -475,7 +475,7 @@ datetounix(long long year, int mon, int day, int hour, int min, int sec) } } leaps += 97 * cycles + 24 * centuries - is_leap; - t = (year - 100) * 31536000LL + leaps * 86400LL + 946684800 + 86400; + t = ((year - 100) * 31536000LL) + (leaps * 86400LL) + 946771200LL; } t += secs_through_month[mon]; if (is_leap && mon >= 2)