date-time-utils: fall back to UTC when timezone is unrecognized
For whatever reason, libical doesn't support the Etc/UTC timezone. Currently we crash gnome-calendar whenever libical doesn't support the current timezone (as returned by GTimeZone). Let's fall back to UTC instead. Fixes #485
This commit is contained in:
@@ -249,7 +249,9 @@ gcal_timezone_to_icaltimezone (GTimeZone *tz)
|
||||
tzid = g_time_zone_get_identifier (tz);
|
||||
ical_tz = i_cal_timezone_get_builtin_timezone (tzid);
|
||||
|
||||
g_assert (ical_tz != NULL);
|
||||
if (!ical_tz)
|
||||
ical_tz = i_cal_timezone_get_utc_timezone ();
|
||||
|
||||
return ical_tz;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user