get the correct current forecast
This commit is contained in:
@@ -11,7 +11,7 @@ bp = Blueprint('api', __name__)
|
|||||||
def api():
|
def api():
|
||||||
db = get_db()
|
db = get_db()
|
||||||
current_conditions = dict(db.execute(
|
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())
|
).fetchone())
|
||||||
|
|
||||||
return current_conditions
|
return current_conditions
|
||||||
|
|||||||
Reference in New Issue
Block a user