fix(stock): 매매알람 이력 days 필터 포맷을 ISO로 통일 (경계일 과다포함 수정, 리뷰 Important)
This commit is contained in:
@@ -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 [
|
||||
|
||||
Reference in New Issue
Block a user