From 9508d529ae99fb9ce1ab87d194c055e204e1da36 Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:26:33 +0100 Subject: [PATCH] Update todo query --- nixos-configurations/server/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos-configurations/server/default.nix b/nixos-configurations/server/default.nix index 9b3b542..4668552 100644 --- a/nixos-configurations/server/default.nix +++ b/nixos-configurations/server/default.nix @@ -253,7 +253,7 @@ wantedBy = [ "timers.target" ]; path = [ pkgs.postgresql_15 ]; script = '' - psql -d todos -c "UPDATE user_todo SET is_overdue = true WHERE NOW() AT TIME ZONE 'CET' >= due_date AND is_completed = false AND is_overdue = false" + psql -d todos -c "UPDATE user_todo SET is_overdue = true WHERE DATE_TRUNC('day', NOW() AT TIME ZONE 'CET') > due_date AND is_completed = false AND is_overdue = false" ''; serviceConfig = { User = "postgres"; }; partOf = [ "todoapp.service" ];