#58 Time zone expansion omits current date

open
nobody
time (5)
5
2010-02-17
2010-02-17
padarlin
No

Issue seen with all libical versions, including 0.44.
Test case iCal data :
1.VEVENT DTSTART and DTEND includes a TZID tag.
2.VTIMEZONE defines a TZID that has DAYLIGHT and STANDARD data, each of
which defines a RRULE and DTSTART.
3.DTSTART in both STANDARD and DAYLIGHT data is ahead of the DTSTART date
of the VEVENT. This is occurring for events that start before the first
offset switch of the year, prior to the DST switch over (i.e. first few
months of the year).

Time zone expansion performed by libical starts from the current year + 5
years. This leads to the VEVENT start date falling before the first time
zone change in the zone->changes array, and the offset is returned as 0.

The expanded time zone changes should include the most recent change prior
to the VEVENT start date (in this case from the prior year) so that the
offset is calculated correctly for the start date.

Time zone expansion performed by libical starts from the current year + 5
years. This leads to the VEVENT start date falling before the first time
zone change in the zone->changes array, and the offset is returned as 0.

The expanded time zone changes should include the most recent change prior
to the VEVENT start date, so that the offset is calculated correctly for
this start date.

Discussion