From 6c21c1a05f357b5cc55e0ddae123e3547207f3ae Mon Sep 17 00:00:00 2001 From: prokrypt Date: Sun, 23 Mar 2025 20:37:35 -0700 Subject: [PATCH 1/2] store.py: fix timezone derp ... and gain 7 hours! yay --- meshview/store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshview/store.py b/meshview/store.py index 14b5aa0..54a48a4 100644 --- a/meshview/store.py +++ b/meshview/store.py @@ -249,7 +249,7 @@ async def get_node_traffic(node_id: int): FROM packet JOIN node ON packet.from_node_id = node.node_id OR packet.to_node_id = node.node_id WHERE node.node_id = :node_id - AND packet.import_time >= DATETIME('now', '-1 day') + AND packet.import_time >= DATETIME('now', 'localtime', '-1 day') GROUP BY packet.portnum ORDER BY packet_count DESC; """), {"node_id": node_id} From a37bbf136f1a13737fa1a508921314d04364100a Mon Sep 17 00:00:00 2001 From: prokrypt Date: Sun, 23 Mar 2025 20:44:27 -0700 Subject: [PATCH 2/2] store.py: missing some hours here too --- meshview/store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshview/store.py b/meshview/store.py index 54a48a4..8fa33b8 100644 --- a/meshview/store.py +++ b/meshview/store.py @@ -228,7 +228,7 @@ async def get_top_traffic_nodes(): ON p.from_node_id = n.node_id WHERE - p.import_time >= DATETIME('now', '-1 day') + p.import_time >= DATETIME('now', 'localtime', '-1 day') GROUP BY n.long_name, n.role ORDER BY