Do not assume that days always have 86400 seconds
Make that date membership is computed correctly, even if a day has less than 86400 seconds (e.g. after changing clocks). Reported-by: Hakan Jerning <jerning@home.se> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
@@ -107,7 +107,7 @@ struct event *event_new(char *mesg, char *note, long day, int id)
|
||||
/* Check if the event belongs to the selected day */
|
||||
unsigned event_inday(struct event *i, long *start)
|
||||
{
|
||||
return (i->day < *start + DAYINSEC && i->day >= *start);
|
||||
return (date_cmp_day(i->day, *start) == 0);
|
||||
}
|
||||
|
||||
char *event_tostr(struct event *o)
|
||||
|
||||
Reference in New Issue
Block a user