- t = icalproperty_get_dtstart(p); // it's safe to use dtstart for all of them
- if (icaltime_is_valid_time(t)) {
- lprintf(9, "FIXME ATTACH TIMEZONE, datetime=%s, tzid=%s\n",
- icaltime_as_ical_string(t),
- icaltime_get_tzid(t)
+ t = icalproperty_get_dtstart(p); /*/ it's safe to use dtstart for all of them */
+ if ((icaltime_is_valid_time(t)) && (z=icaltime_get_timezone(t), z)) {
+
+ zone_already_attached = 0;
+ for (i=0; i<5; ++i) {
+ if (z == attached_zones[i]) {
+ ++zone_already_attached;
+ syslog(LOG_DEBUG, "zone already attached!!\n");
+ }
+ }
+ if ((!zone_already_attached) && (num_zones_attached < 5)) {
+ syslog(LOG_DEBUG, "attaching zone %d!\n", num_zones_attached);
+ attached_zones[num_zones_attached++] = z;
+ }
+
+ icalproperty_set_parameter(p,
+ icalparameter_new_tzid(icaltimezone_get_tzid((icaltimezone *)z))