get the correct current forecast

This commit is contained in:
2026-01-12 15:14:11 -07:00
parent 1dc30200fd
commit 3b3d7c5247

View File

@@ -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