[evolution-data-server] evo-I#831 - Free/Busy times are not in UTC
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] evo-I#831 - Free/Busy times are not in UTC
- Date: Thu, 12 Mar 2020 08:58:22 +0000 (UTC)
commit bf787b7c1e134b855f7c2f1d35ca8ecd5a66473e
Author: Milan Crha <mcrha redhat com>
Date: Thu Mar 12 09:59:22 2020 +0100
evo-I#831 - Free/Busy times are not in UTC
Closes https://gitlab.gnome.org/GNOME/evolution/issues/831
src/calendar/backends/file/e-cal-backend-file.c | 6 ++++++
src/calendar/libedata-cal/e-cal-meta-backend.c | 10 ++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/calendar/backends/file/e-cal-backend-file.c b/src/calendar/backends/file/e-cal-backend-file.c
index 3ce7b80e5..78e96c677 100644
--- a/src/calendar/backends/file/e-cal-backend-file.c
+++ b/src/calendar/backends/file/e-cal-backend-file.c
@@ -2051,6 +2051,12 @@ free_busy_instance (ICalComponent *icomp,
ICalPeriod *ipt;
const gchar *summary, *location;
+ if (!i_cal_time_is_date (instance_start))
+ i_cal_time_convert_to_zone_inplace (instance_start, i_cal_timezone_get_utc_timezone ());
+
+ if (!i_cal_time_is_date (instance_end))
+ i_cal_time_convert_to_zone_inplace (instance_end, i_cal_timezone_get_utc_timezone ());
+
ipt = i_cal_period_new_null_period ();
i_cal_period_set_start (ipt, instance_start);
i_cal_period_set_end (ipt, instance_end);
diff --git a/src/calendar/libedata-cal/e-cal-meta-backend.c b/src/calendar/libedata-cal/e-cal-meta-backend.c
index 93f4806ba..ea39eb547 100644
--- a/src/calendar/libedata-cal/e-cal-meta-backend.c
+++ b/src/calendar/libedata-cal/e-cal-meta-backend.c
@@ -1422,6 +1422,12 @@ ecmb_add_free_busy_instance_cb (ICalComponent *icomp,
ICalParameter *param;
ICalPeriod *ipt;
+ if (!i_cal_time_is_date (instance_start))
+ i_cal_time_convert_to_zone_inplace (instance_start, i_cal_timezone_get_utc_timezone ());
+
+ if (!i_cal_time_is_date (instance_end))
+ i_cal_time_convert_to_zone_inplace (instance_end, i_cal_timezone_get_utc_timezone ());
+
ipt = i_cal_period_new_null_period ();
i_cal_period_set_start (ipt, instance_start);
i_cal_period_set_end (ipt, instance_end);
@@ -1563,8 +1569,8 @@ ecmb_get_free_busy_sync (ECalBackendSync *sync_backend,
continue;
}
- starttt = i_cal_time_new_from_timet_with_zone (start, FALSE, NULL);
- endtt = i_cal_time_new_from_timet_with_zone (end, FALSE, NULL);
+ starttt = i_cal_time_new_from_timet_with_zone (start, FALSE, utc_zone);
+ endtt = i_cal_time_new_from_timet_with_zone (end, FALSE, utc_zone);
success = e_cal_recur_generate_instances_sync (icomp, starttt, endtt,
ecmb_add_free_busy_instance_cb, vfreebusy,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]