From f764cbfc9014354eb40cde4e151351cfe0e687ea Mon Sep 17 00:00:00 2001 From: thiloho <123883702+thiloho@users.noreply.github.com> Date: Sun, 31 Dec 2023 18:27:48 +0100 Subject: [PATCH] Update flake and update todo timer query --- flake.lock | 6 +++--- nixos-configurations/server/default.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 6ce6270..aa0cefd 100644 --- a/flake.lock +++ b/flake.lock @@ -176,11 +176,11 @@ ] }, "locked": { - "lastModified": 1703614087, - "narHash": "sha256-jqbm2OSA4yywl7q9eV2koe0b4mKeoZfxiJWKBllIosA=", + "lastModified": 1704042710, + "narHash": "sha256-S24SZ45gwBr11+5MvAn17H9m511r2W6MBml8CM7esJE=", "owner": "thiloho", "repo": "todos", - "rev": "7da2d3bf72e145ffb112f52b77905de34af64274", + "rev": "fa9703553ce932fc3fcc53788d7d6954cb5373bd", "type": "github" }, "original": { diff --git a/nixos-configurations/server/default.nix b/nixos-configurations/server/default.nix index cebdf04..1017450 100644 --- a/nixos-configurations/server/default.nix +++ b/nixos-configurations/server/default.nix @@ -256,7 +256,7 @@ pkgs.postgresql_15 ]; script = '' - psql -d todos -c "UPDATE user_todo SET is_overdue = true WHERE extract(epoch from CURRENT_DATE) > extract(epoch from due_date) AND is_completed = false AND is_overdue = false" + 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" ''; serviceConfig = { User = "postgres";