week-header: Use g_date_time_compare()

It is incorrect to use the date-only comparison here. Use the appropriate
GDateTime API and fix a truckload of issues.

Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/546
This commit is contained in:
Georges Basile Stavracas Neto
2020-04-01 21:06:51 -03:00
parent b703f5746d
commit 19fc8138ba
+1 -1
View File
@@ -1775,7 +1775,7 @@ gcal_week_header_add_event (GcalWeekHeader *self,
}
/* Start position */
if (gcal_date_time_compare_date (event_start, week_start) >= 0)
if (g_date_time_compare (event_start, week_start) >= 0)
start = floor (g_date_time_difference (event_start, week_start) / G_TIME_SPAN_DAY);
else
start = 0;