From 1d8a1646340a044f165b1b541adffc3505391ebb Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Tue, 5 Dec 2017 16:34:14 -0600 Subject: [PATCH] event: Fix changing the timezone g_date_time_equal() corrects for timezone offsets to ensure that, e.g., 6 AM CST is treated as equal to 12 PM UTC. This means attempts to change the start and end times of events to the same time in another timezone are currently failing. We need to remove this attempt at optimization because it prevents gcal_event_set_timezone() from ever doing anything. --- src/gcal-event.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gcal-event.c b/src/gcal-event.c index 789f67c4..dc619245 100644 --- a/src/gcal-event.c +++ b/src/gcal-event.c @@ -985,9 +985,7 @@ gcal_event_set_date_end (GcalEvent *self, { g_return_if_fail (GCAL_IS_EVENT (self)); - if (self->dt_end != dt && - (!self->dt_end || !dt || - (self->dt_end && dt && !g_date_time_equal (self->dt_end, dt)))) + if (self->dt_end != dt) { ECalComponentDateTime *component_dt, current; @@ -1042,9 +1040,7 @@ gcal_event_set_date_start (GcalEvent *self, { g_return_if_fail (GCAL_IS_EVENT (self)); - if (self->dt_start != dt && - (!self->dt_start || !dt || - (self->dt_start && dt && !g_date_time_equal (self->dt_start, dt)))) + if (self->dt_start != dt) { ECalComponentDateTime *component_dt, current;