This commit is contained in:
薇薇安 2026-01-17 13:32:45 +08:00
parent 3f7af51af4
commit affac7bdb9

View File

@ -8,6 +8,8 @@ import sys
from pathlib import Path from pathlib import Path
import logging import logging
import asyncio import asyncio
import time
from datetime import timezone, timedelta
project_root = Path(__file__).parent.parent.parent.parent project_root = Path(__file__).parent.parent.parent.parent
sys.path.insert(0, str(project_root)) sys.path.insert(0, str(project_root))
@ -50,7 +52,6 @@ def get_date_range(period: Optional[str] = None):
start_date_str = start_date.strftime('%Y-%m-%d %H:%M:%S') start_date_str = start_date.strftime('%Y-%m-%d %H:%M:%S')
# 结束时间:使用当前时间,确保包含最新单子,北京时间 # 结束时间:使用当前时间,确保包含最新单子,北京时间
# 使用北京时间(东八区) # 使用北京时间(东八区)
from datetime import timezone, timedelta
beijing_tz = timezone(timedelta(hours=8)) beijing_tz = timezone(timedelta(hours=8))
end_date = datetime.now(beijing_tz) end_date = datetime.now(beijing_tz)
end_date_str = end_date.strftime('%Y-%m-%d %H:%M:%S') end_date_str = end_date.strftime('%Y-%m-%d %H:%M:%S')