From: Leah Neukirchen Date: Tue, 29 Aug 2017 15:41:44 +0000 (+0200) Subject: find_next: take leap year into account (e.g. when using dayofyear) X-Git-Tag: v0.2~4 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=0f5eae045db3c1c146ebdf62eac77a10c2255baf;p=user%2Fhenk%2Fcode%2Fsnooze.git find_next: take leap year into account (e.g. when using dayofyear) --- diff --git a/snooze.c b/snooze.c index b29c7b6..f37c42a 100644 --- a/snooze.c +++ b/snooze.c @@ -185,7 +185,7 @@ next_day: tm->tm_hour = 0; t = mktime(tm); - if (t > from+(365*24*60*60)) // no result within a year + if (t > from+(366*24*60*60)) // no result within a year return -1; }