[gnome-calendar/mcatanzaro/#485] date-time-utils: fall back to UTC when timezone is unrecognized
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/mcatanzaro/#485] date-time-utils: fall back to UTC when timezone is unrecognized
- Date: Tue, 18 Feb 2020 15:49:50 +0000 (UTC)
commit d3b14a2ea9decbf2fcd97e3d4b799829a3171bc2
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Feb 18 15:46:24 2020 +0000
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
src/utils/gcal-date-time-utils.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/utils/gcal-date-time-utils.c b/src/utils/gcal-date-time-utils.c
index 48da114c..7555ec6c 100644
--- a/src/utils/gcal-date-time-utils.c
+++ b/src/utils/gcal-date-time-utils.c
@@ -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 == NULL)
+ ical_tz = i_cal_timezone_get_utc_timezone ();
+
return ical_tz;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]