event: Workaround libical-glib bug before 3.0.12 version

Even the is_daylight argument is optional, the libical-glib had a bug
to require it. No need to bump the dependency, just workaround the problem.

Related to https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/444
This commit is contained in:
Milan Crha
2022-03-07 14:53:52 -03:00
committed by Georges Basile Stavracas Neto
parent be95d58cda
commit bde989cc0e
+3 -1
View File
@@ -192,8 +192,10 @@ get_timezone_from_ical (GcalEvent *self,
{
g_autofree gchar *tzid = NULL;
gint offset;
gint is_daylight = 0;
offset = i_cal_timezone_get_utc_offset (zone, itt, NULL);
/* libical-glib prior to 3.0.12 fails if no return location for is_daylight is passed */
offset = i_cal_timezone_get_utc_offset (zone, itt, &is_daylight);
tzid = format_utc_offset (offset);
tz = g_time_zone_new_identifier (tzid);
}