diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-03-26 15:26:08 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2023-03-26 15:26:08 +0200 |
commit | d2f63645bf165726384f50f4e8b0f3ee048e7ae3 (patch) | |
tree | dbad76b82466d5a9930df67321dda8bd09cce210 | |
parent | daf56f2cb0a6994c4be8f1b57f1eb4b4cb8c91ba (diff) |
sfeed.c: datetounix: fix incorrect int type to long
Found while testing sfeed on MS-DOS with Open Watcom (for fun :)).
There an int is 16-bit and sfeed incorrectly wrapped the value, which produced
incorrect parsed UNIX timestamps as output.
-rw-r--r-- | sfeed.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -436,7 +436,7 @@ string_print_timestamp(String *s) static long long datetounix(long long year, int mon, int day, int hour, int min, int sec) { - static const int secs_through_month[] = { + static const long secs_through_month[] = { 0, 31 * 86400, 59 * 86400, 90 * 86400, 120 * 86400, 151 * 86400, 181 * 86400, 212 * 86400, 243 * 86400, 273 * 86400, 304 * 86400, 334 * 86400 }; |