[evolution/gnome-41] icalendar-importer: Can show incorrect time in imported data preview
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-41] icalendar-importer: Can show incorrect time in imported data preview
- Date: Mon, 29 Nov 2021 09:11:47 +0000 (UTC)
commit 7e78f9fd6912860bae5b0e1323481c098591d01f
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 29 10:08:30 2021 +0100
icalendar-importer: Can show incorrect time in imported data preview
That happens when the .ics file does not contain timezones referenced
by the component properties. Also check for the builtin timezones
as if the TZID was a location.
src/calendar/importers/icalendar-importer.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/calendar/importers/icalendar-importer.c b/src/calendar/importers/icalendar-importer.c
index f2ddcaa018..11f6a465f6 100644
--- a/src/calendar/importers/icalendar-importer.c
+++ b/src/calendar/importers/icalendar-importer.c
@@ -1207,7 +1207,6 @@ format_dt (const ECalComponentDateTime *dt,
tt = e_cal_component_datetime_get_value (dt);
- i_cal_time_set_timezone (tt, NULL);
if (e_cal_component_datetime_get_tzid (dt)) {
const gchar *tzid = e_cal_component_datetime_get_tzid (dt);
@@ -1216,8 +1215,13 @@ format_dt (const ECalComponentDateTime *dt,
if (!i_cal_time_get_timezone (tt))
i_cal_time_set_timezone (tt, i_cal_timezone_get_builtin_timezone_from_tzid (tzid));
+ if (!i_cal_time_get_timezone (tt))
+ i_cal_time_set_timezone (tt, i_cal_timezone_get_builtin_timezone (tzid));
+
if (!i_cal_time_get_timezone (tt) && g_ascii_strcasecmp (tzid, "UTC") == 0)
i_cal_time_set_timezone (tt, i_cal_timezone_get_utc_timezone ());
+ } else if (!i_cal_time_is_utc (tt)) {
+ i_cal_time_set_timezone (tt, NULL);
}
if (i_cal_time_get_timezone (tt))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]