* When encapsulating a VEVENT into a full VCALENDAR
authorArt Cancro <ajc@citadel.org>
Wed, 3 Dec 2008 18:53:48 +0000 (18:53 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 3 Dec 2008 18:53:48 +0000 (18:53 +0000)
  component, all TZID's referenced in timestamps are now also
  encapsulated into the VCALENDAR component, making the component
  fully portable across time zones.  The sun is shining, birds are
  chirping, free ice cream is being distributed on streetcorners, and
  things are just generally good all around.  For now.

webcit/calendar_tools.c

index 9f846457bcad176c4d733bfad1c2c102a036fc7d..21b8e063f8f5ece9bf71e069e96c8ce0904c45cf 100644 (file)
@@ -281,7 +281,7 @@ icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp) {
                                }
 
                                icalproperty_set_parameter(p,
-                                       icalparameter_new_tzid(icaltimezone_get_location((icaltimezone *)z))
+                                       icalparameter_new_tzid(icaltimezone_get_tzid((icaltimezone *)z))
                                );
                        }
                }
@@ -303,8 +303,7 @@ icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp) {
        /* Attach any timezones we need */
        if (num_zones_attached > 0) for (i=0; i<num_zones_attached; ++i) {
                icalcomponent *zc;
-               zc = icalcomponent_new_vtimezone();
-               /* FIXME actually put something in here!!!! */
+               zc = icalcomponent_new_clone(icaltimezone_get_component((icaltimezone *)attached_zones[i]));
                icalcomponent_add_component(encaps, zc);
        }