Filter runway history by observation time

This commit is contained in:
2569718930@qq.com
2026-06-15 20:20:31 +08:00
parent 7443383720
commit 383011f9fe
6 changed files with 43 additions and 9 deletions
+5 -2
View File
@@ -4257,8 +4257,11 @@ class DBManager:
wind_dir, wind_speed, rvr, mor, humidity,
otime_utc, created_at
FROM runway_obs_log
WHERE icao = ? AND created_at >= datetime('now', ? || ' minutes')
ORDER BY created_at ASC
WHERE icao = ?
AND datetime(COALESCE(NULLIF(otime_utc, ''), created_at))
>= datetime('now', ? || ' minutes')
ORDER BY datetime(COALESCE(NULLIF(otime_utc, ''), created_at)) ASC,
created_at ASC
""",
(str(icao).strip().upper(), str(-int(minutes))),
).fetchall()