+ p = icalcomponent_get_first_property(cal, ICAL_DTSTART_PROPERTY);
+ if (!p) return;
+ dtstart = icalproperty_get_dtstart(p);
+
+ if (icaltime_is_utc(dtstart)) {
+ dtstart.zone = icaltimezone_get_utc_timezone();
+ }
+ else {
+ dtstart.zone = icalcomponent_get_timezone(top_level_cal,
+ icalparameter_get_tzid(
+ icalproperty_get_first_parameter(p, ICAL_TZID_PARAMETER)
+ )
+ );
+ if (!dtstart.zone) {
+ dtstart.zone = get_default_icaltimezone();
+ }
+ }
+ // FIXME do more here