fix: 修正 d.minute() 调用导致盘前连接 worker 报错。

datetime.minute 是属性而非方法,修复后交易时段与盘前自动连 CTP 可正常工作。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-25 12:36:01 +08:00
parent 32f1fa2c66
commit d127a53870
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ def is_trading_session() -> bool:
return False
if wd == 5 and d.hour < 21:
return False
t = d.hour * 60 + d.minute()
t = d.hour * 60 + d.minute
def in_range(sh: int, sm: int, eh: int, em: int) -> bool:
return t >= sh * 60 + sm and t < eh * 60 + em
if in_range(9, 0, 11, 30):