fix(stock): 매매알람 이력 days 필터 포맷을 ISO로 통일 (경계일 과다포함 수정, 리뷰 Important)

This commit is contained in:
2026-07-02 15:43:22 +09:00
parent b2c4ca0e0b
commit 01a8aee226
2 changed files with 16 additions and 1 deletions

View File

@@ -509,7 +509,7 @@ def add_alert_history(ticker: str, name: str, kind: str, condition: str, price,
def get_alert_history(days: int = 7) -> list:
with _conn() as conn:
rows = conn.execute(
"SELECT * FROM trade_alert_history WHERE fired_at >= datetime('now', ?) ORDER BY fired_at DESC",
"SELECT * FROM trade_alert_history WHERE fired_at >= strftime('%Y-%m-%dT%H:%M:%fZ','now', ?) ORDER BY fired_at DESC",
(f"-{int(days)} days",),
).fetchall()
return [