|
From: Ben H. <0x6...@gm...> - 2018-01-22 22:34:00
|
Hi, I was wondering in 1.1.6 why SELECT rrule_event_overlaps( '2018-01-23 18:00:01'::timestamp, -- dtstart '2018-01-25 00:00:00'::timestamp, -- dtend null, -- rrule '2018-01-22 12:00:00'::timestamp, -- mindate '2018-01-22 12:00:00'::timestamp -- maxdate ); would return true, whereas setting dtstart to a minute beforehand returns false: SELECT rrule_event_overlaps( '2018-01-23 18:00:00'::timestamp, -- dtstart '2018-01-25 00:00:00'::timestamp, -- dtend null, -- rrule '2018-01-22 12:00:00'::timestamp, -- mindate '2018-01-22 12:00:00'::timestamp -- maxdate ); Looking into the implementation, there is a short circuit: IF repeatrule IS NULL THEN RETURN (dtstart <= maxdate AND base_date >= mindate); END IF; In this particular constellation, this function flips when dtstart goes from 2018-01-23 18:00:00 to 2018-01-23 18:00:01. Is this behavior expected? Thanks in advance, Ben |