I've submitted a bug report for an issue I'm seeing using libical to handle iCal data received from iPhone/iPod Touch devices.
The problem occurs for appointments that occur before the first offset change of the year, ie. in the first few months of the year before DST starts.
However, this seems such a glaring issue, perhaps my use of libical is incorrect, or can be modified to resolve the issue. Or perhaps this is an Apple problem that others work around?
The issue can be observed when calling icaltimezone_get_utc_offset(), passing zone data that defines Daylight and Standard offsets that include DTSTART and RRULE data, and a tt value that represents a date prior to the DTSTART value of the Daylight data in the zone data.
icaltimezone_expand_timezone() expands from the earliest DTSTART value in the zone data. As this occurs after the passed tt value, the tt value falls before the earliest change, and so the UTC offset returned is 0.
Is it invalid for the DTSTART value of the VEVENT component to be behind the earliest DTSTART value in the zone data?
If so, then this is an Apple bug, that I'm sure others must have encountered. If it is valid, then perhaps libical should expand the RRULE retroactively to ensure coverage for the date passed to icaltimezone_get_utc_offset().