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.
This commit is contained in:
+2
-6
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user