对于电表的总电量,如果获取时间是59分59秒,加1秒,变成下一个小时
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -167,6 +167,10 @@ class DbfToPostgresCtllogPwcPipeline(BasePipeline):
|
||||
if created is None or real_value is None:
|
||||
continue
|
||||
|
||||
# 对于总用电量,如果正好是 59 分 59 秒,则加 1 秒
|
||||
if data_field == "TOTALIZE" and created.minute == 59 and created.second == 59:
|
||||
created += timedelta(seconds=1)
|
||||
|
||||
created = created - timedelta(hours=8)
|
||||
created_str = created.strftime('%Y-%m-%d %H:%M:%S') + '+00'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user