From 3b3d7c52477a1a6924ffd08a73025451d2725386 Mon Sep 17 00:00:00 2001 From: Brian Rogers Date: Mon, 12 Jan 2026 15:14:11 -0700 Subject: [PATCH] get the correct current forecast --- weather/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weather/api.py b/weather/api.py index 9ef3dff..82d4b5e 100644 --- a/weather/api.py +++ b/weather/api.py @@ -11,7 +11,7 @@ bp = Blueprint('api', __name__) def api(): db = get_db() current_conditions = dict(db.execute( - "SELECT * FROM `current_forecasts` ORDER BY `end_time` DESC LIMIT 1" + "SELECT * FROM `current_forecasts` WHERE DATETIME('now', 'localtime') BETWEEN `start_time` AND `end_time` LIMIT 1" ).fetchone()) return current_conditions