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
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general
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
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Davical-general mailing list
Davical-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/davical-general