[gnome-calendar/gnome-3-26] event: Fix changing the timezone



commit f132786891a73a7623cc7289da9c3a385c4234ff
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Tue Dec 5 16:34:14 2017 -0600

    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 e3dd041e..e7e2889a 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;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]