From 3c00112efab4521647c4380ee2c9a7b3cbce1848 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sat, 4 Feb 2017 20:11:31 +0100 Subject: [PATCH] Fixed error in date filtering algorithm --- src/mainwindow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.c b/src/mainwindow.c index 86ab21d..26deecf 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -63,7 +63,9 @@ static gboolean mainWindow_list_entry_visible(GtkTreeModel *model, GtkTreeIter * gtk_tree_model_get(model, iter, COL_TIMESTAMP, &datetime, -1); if (datetime) { time = g_date_time_to_unix(datetime); - return time >= mainWindow->filterSettings.time_start && time <= mainWindow->filterSettings.time_end; + /* The addition/subtraction in braces allows for the whole day instead of just its first second. */ + return time >= (mainWindow->filterSettings.time_start - (60 * 60 * 23 + 60 * 59 + 59)) && + time <= mainWindow->filterSettings.time_end + (60 * 60 * 23 + 60 * 59 + 59); } else { return 0; }