Author: Tom Sydney Kerckhove <syd@cs-syd.eu>
Committer: Tom Sydney Kerckhove <NorfairKing@users.noreply.github.com>
ical-recurrence: bound a UTC Until by instants, not by local times @ The UNTIL rule part defines a DATE or DATE-TIME value that bounds the recurrence rule in an inclusive manner. @ The bound is an instant, so whether an instance is inside it has to be decided on instants. Expressing the Until in the time zone of DTSTART answers that correctly whenever the instance and the bound share an offset from UTC, which covers every fixed-offset zone and all but about an hour around each transition. It cannot answer it across a transition, where the local order and the order of the instants disagree. Resolve the generated instances and compare them with the Until directly. localiseUntil stays, now purely as a pre-filter so that an unbounded rule does not generate occurrences all the way to the limit, and it gains a day of slack so that it can never cut off an instance this filter would have kept. An instance whose local time cannot be resolved, or a rule whose time zone the calendar does not define, is left alone: this only removes instances it is sure about, so neither case turns into a failure.