Fixed time error

This commit is contained in:
DingZQ
2025-03-08 10:35:20 +08:00
parent 99cf111117
commit f098aa42ae
3 changed files with 23 additions and 3 deletions

3
.gitignore vendored
View File

@@ -25,4 +25,5 @@ TODO.md
# build pyd # build pyd
build build
*.c *.c
*.pyd *.pyd
temp/

View File

@@ -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() query_api = client.query_api()
# 将北京时间转换为 UTC 时间 # 将北京时间转换为 UTC 时间
utc_start_time = time_api.parse_utc_time(start_time) bg_start_time = time_api.parse_beijing_time(start_time)
utc_end_time = time_api.parse_utc_time(end_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 = [] SCADA_results = []

View File

@@ -50,3 +50,20 @@ influx config create --config-name onboarding `
--org "TJWATERORG" ` --org "TJWATERORG" `
--token "cpuAmRnJqSMd7F34q1VjG6JgwZfO0S0w0vK2ZmAvA6zvf6m-6UAobUKSW3xhGr_nxZI5HsFlpfZHT1i8sI3LyQ==" ` --token "cpuAmRnJqSMd7F34q1VjG6JgwZfO0S0w0vK2ZmAvA6zvf6m-6UAobUKSW3xhGr_nxZI5HsFlpfZHT1i8sI3LyQ==" `
--active --active
Setup instructions for WMH's work
1. import scada_info.csv
run python online_Analysis.py
2. import history_pattern_flow.csv
run python online_Analysis.py
Should manually change code
3. run create_template.py
4. run influxdb_api.py
在InfluxDB数据库中创建好我们需要的bucket
create buckets