Fixed time issue
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,4 +25,5 @@ TODO.md
|
||||
# build pyd
|
||||
build
|
||||
*.c
|
||||
*.pyd
|
||||
*.pyd
|
||||
temp/
|
||||
|
||||
@@ -1354,8 +1354,10 @@ def query_SCADA_data_by_device_ID_and_time_range(query_ids_list: List[str], star
|
||||
query_api = client.query_api()
|
||||
# 将北京时间转换为 UTC 时间
|
||||
|
||||
utc_start_time = time_api.parse_utc_time(start_time)
|
||||
utc_end_time = time_api.parse_utc_time(end_time)
|
||||
bg_start_time = time_api.parse_beijing_time(start_time)
|
||||
utc_start_time = bg_start_time.astimezone(timezone.utc)
|
||||
bg_end_time = time_api.parse_beijing_time(end_time)
|
||||
utc_end_time = bg_end_time.astimezone(timezone.utc)
|
||||
|
||||
# 构建查询字典
|
||||
SCADA_results = []
|
||||
|
||||
Reference in New Issue
Block a user