This commit is contained in:
DingZQ
2025-05-17 21:29:57 +08:00
parent 1e6c88dabe
commit 5e1eeb7ace

View File

@@ -2740,9 +2740,10 @@ async def fastapi_run_project_by_date(network: str, querydate: str) -> str:
bg_start_time, bg_end_time = time_api.parse_beijing_date_range(querydate)
bg_start_time_str = bg_start_time.strftime("%Y-%m-%dT%H:%M:%SZ")
# convert to the format of 2024-11-25T09:00:00+08:00'
bg_start_time_str = bg_start_time.strftime("%Y-%m-%dT%H:%M:%S%z")
print(f"bg_start_time_str: {bg_start_time_str}")
bg_end_time_str = bg_end_time.strftime("%Y-%m-%dT%H:%M:%SZ")
bg_end_time_str = bg_end_time.strftime("%Y-%m-%dT%H:%M:%S%z")
print(f"bg_end_time_str: {bg_end_time_str}")
result = simulation.run_simulation(name=network, simulation_type='realtime', modify_pattern_start_time=bg_start_time_str, modify_total_duration=86400)