From 094d1330f493afb294a5b7b9970cdaeead38edb3 Mon Sep 17 00:00:00 2001 From: Abdullahi Usman Date: Tue, 23 Jul 2024 22:29:06 +0100 Subject: [PATCH] gcal-window: start selected day at 00:00:00(HH:MM:SS) whenever a day is selected anywhere, let start it at 00:00:00 fixes: https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/1256 --- src/gui/gcal-window.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/gui/gcal-window.c b/src/gui/gcal-window.c index d0bb668f..45c055c1 100644 --- a/src/gui/gcal-window.c +++ b/src/gui/gcal-window.c @@ -233,13 +233,20 @@ maybe_add_subscribers_to_timeline (GcalWindow *self) static void update_active_date (GcalWindow *window, - GDateTime *new_date) + GDateTime *date) { + g_autoptr (GDateTime) new_date = NULL; g_autofree gchar *new_date_string = NULL; GcalWindowView i; GCAL_ENTRY; + new_date = g_date_time_new (g_date_time_get_timezone (date), + g_date_time_get_year (date), + g_date_time_get_month (date), + g_date_time_get_day_of_month (date), + 0, 0, 0); + new_date_string = g_date_time_format (new_date, "%x %X %z"); g_debug ("Updating active date to %s", new_date_string);