const gchar *e_cal_match_tzid(const gchar *tzid)
{
const gchar *location;
- const gchar *systzid;
+ const gchar *systzid = NULL;
gsize len = strlen(tzid);
gssize eostr;
systzid = e_cal_match_tzid(strippedtzid);
g_free(strippedtzid);
if (systzid) {
- return systzid;
+ goto done;
}
}
}
location + 1 :
location);
if (systzid) {
- return systzid;
+ goto done;
}
}
/* TODO: lookup table for Exchange TZIDs */
- return NULL;
+ done:
+ if (systzid && !strcmp(systzid, "UTC")) {
+ /**
+ * UTC is special: it doesn't have a real VTIMEZONE in
+ * EDS. Matching some pseudo VTTIMEZONE with UTC in the TZID
+ * to our internal UTC "timezone" breaks
+ * e_cal_check_timezones() (it patches the event to use
+ * TZID=UTC, which cannot be exported correctly later on) and
+ * e_cal_get_timezone() (triggers an assert).
+ *
+ * So better avoid matching against it...
+ */
+ return NULL;
+ } else {
+ return systzid;
+ }
}
static void patch_tzids(icalcomponent *subcomp,
CORBA_Environment ev;
ECalendarStatus status = E_CALENDAR_STATUS_OK;
ECalendarOp *our_op;
- icalcomponent *icalcomp;
+ icalcomponent *icalcomp = NULL;
const gchar *systzid;
e_return_error_if_fail (ecal && E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
* caller.
*/
icaltimezone *syszone = icaltimezone_get_builtin_timezone_from_tzid (systzid);
- g_assert (syszone);
if (syszone) {
gboolean found = FALSE;
icalproperty *prop;
prop = icalcomponent_get_next_property(icalcomp,
ICAL_ANY_PROPERTY);
}
- g_assert (found);
} else {
status = E_CALENDAR_STATUS_INVALID_OBJECT;
}