fix: tag_update 先判断是否本地时间
This commit is contained in:
parent
730aa68966
commit
43d0d90e41
|
@ -21,7 +21,7 @@ myLogger = logging.getLogger("log")
|
|||
def db_insert_mplogx_batch(rows):
|
||||
for row in rows:
|
||||
_, tag_val, tag_code, tag_update = row
|
||||
if isinstance(tag_update, datetime):
|
||||
if tag_update.tzinfo is None:
|
||||
tag_update = timezone.make_aware(tag_update)
|
||||
insert_mplogx_item(tag_code, tag_val, tag_update, {})
|
||||
|
||||
|
|
Loading…
Reference in New Issue