diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-03-26 18:03:24 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-03-26 18:03:24 +0200 |
commit | c7739b9c04b4b49888e1161164b1cdac0d9930ca (patch) | |
tree | 97b040e7432287fb536574448b54f28e5e98eacf | |
parent | 04db56ad05b207374c973b8651a6bfa14bbbac4b (diff) |
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.
-rw-r--r-- | sfeed.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |