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:
@@ -119,8 +119,7 @@ struct apoint *apoint_new(char *mesg, char *note, long start, long dur,
|
||||
|
||||
unsigned apoint_inday(struct apoint *i, long *start)
|
||||
{
|
||||
return (i->start <= *start + DAYINSEC
|
||||
&& i->start + i->dur > *start);
|
||||
return (date_cmp_day(i->start, *start) == 0);
|
||||
}
|
||||
|
||||
void apoint_sec2str(struct apoint *o, long day, char *start, char *end)
|
||||
|
||||
Reference in New Issue
Block a user