5a2132a5

Author: Tom Sydney Kerckhove <syd@cs-syd.eu>

Committer: Tom Sydney Kerckhove <NorfairKing@users.noreply.github.com>

ical-recurrence: compare a UTC Until in the time zone of DTSTART

@
The UNTIL rule part defines a DATE or DATE-TIME value that bounds
the recurrence rule in an inclusive manner.
@

@
If the "DTSTART" property
is specified as a date with UTC time or a date with local time and time
zone reference, then the UNTIL rule part MUST be specified as a date
with UTC time.
@

A zoned DTSTART is therefore bounded by an UNTIL in UTC, while the
occurrences are generated as local times in that same zone.  Comparing
the two directly is out by the zone's offset: east of UTC the last
instance is dropped, west of it an instance past the bound is kept.

Unresolve the UNTIL into DTSTART's time zone before handing the rule to
recurRecurrenceRuleDateTimeStarts.  Moving the bound rather than the
occurrences keeps recurRecurrenceRuleLocalTimes taking a bare LocalTime,
which it has to, since it has no time zone to resolve with and lives in a
module that ICal.Recurrence imports rather than the other way around.
A UTC or floating DTSTART is untouched, because there the local times and
the UNTIL are already in the same frame.

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 3m05s 1s 1s 3m06s 3m05s
Eval 3m21s 11s 11s 3m32s 15s
Build 3m32s 18s 12m05s 15m38s 11m47s
Suite 3m05s 30s 12m32s 15m38s 15m07s

Timeline

0s3m30s15m20s15m30s