$Log$
+ Revision 601.99 2002/12/28 05:33:29 ajc
+ * ical_dezonify: set is_utc=1 even if we didn't convert from some arbitrary
+ timezone. Presumably this means the time was already UTC, and we really
+ need that "Z" to get slapped on it.
+
Revision 601.98 2002/12/28 05:12:06 ajc
* Yet another attempt at making ical_dezonify() send outgoing calendar items
in UTC format. (This one will probably work -- the timestamps have the
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
icalcomponent *rcal,
icalproperty *prop) {
- icaltimezone *t;
+ icaltimezone *t = NULL;
icalparameter *param;
const char *tzid;
struct icaltimetype TheTime;
/* Hunt for a TZID parameter in this property. */
param = icalproperty_get_first_parameter(prop, ICAL_TZID_PARAMETER);
- if (param == NULL) return;
/* Get the stringish name of this TZID. */
- tzid = icalparameter_get_tzid(param);
- if (tzid == NULL) return;
+ if (param != NULL) {
+ tzid = icalparameter_get_tzid(param);
- /* Convert it to an icaltimezone type. */
- t = icalcomponent_get_timezone(cal, tzid);
- if (t == NULL) return;
+ /* Convert it to an icaltimezone type. */
+ if (tzid != NULL) {
+ t = icalcomponent_get_timezone(cal, tzid);
+ }
+
+ }
/* Now we know the timezone. Convert to UTC. */
}
/* Do the conversion. */
- icaltimezone_convert_time(&TheTime,
- t,
- icaltimezone_get_utc_timezone()
- );
+ if (t != NULL) {
+ icaltimezone_convert_time(&TheTime,
+ t,
+ icaltimezone_get_utc_timezone()
+ );
+ }
TheTime.is_utc = 1;
icalproperty_remove_parameter_by_kind(prop, ICAL_TZID_PARAMETER);