view: Fix drag and drop issue with events in daylight saving time

When dragging and dropping events in week view during the week of
daylight savings time switch, events were off by one hour. This fixes this
behavior by using the util function gcal_date_time_add_floating_minutes.

Fixes #1198
This commit is contained in:
Otávio Silva
2024-08-28 00:20:18 +00:00
committed by Jeff Fortin
parent f7aadd23bb
commit b25623071f
+1 -1
View File
@@ -362,7 +362,7 @@ move_event_to_cell (GcalWeekGrid *self,
changed_event = gcal_event_new_from_event (event);
week_start = gcal_date_time_get_start_of_week (self->active_date);
dnd_date = g_date_time_add_minutes (week_start, cell * 30);
dnd_date = gcal_date_time_add_floating_minutes (week_start, cell * 30);
/*
* Calculate the diff between the dropped cell and the event's start date,