diff --git a/influxdb_api.py b/influxdb_api.py index 62bc3e7..853db97 100644 --- a/influxdb_api.py +++ b/influxdb_api.py @@ -1354,7 +1354,7 @@ def query_all_record_by_date(query_date: str, bucket: str="realtime_simulation_r # 将 start_date 的北京时间转换为 UTC 时间 start_time = (datetime.strptime(query_date, "%Y-%m-%d") - timedelta(days=1)).replace(hour=16, minute=0, second=0, tzinfo=timezone.utc).isoformat() print(start_time) - stop_time = (datetime.strptime(query_date, "%Y-%m-%d") - timedelta(days=1)).replace(hour=19, minute=0, second=0, tzinfo=timezone.utc).isoformat() + stop_time = (datetime.strptime(query_date, "%Y-%m-%d") - timedelta(days=1)).replace(hour=17, minute=0, second=0, tzinfo=timezone.utc).isoformat() print(stop_time) # 构建 Flux 查询语句 flux_query = f'''