Store fault times only to the second

Any more precision is unnecessary and saves 6 chars when displaying
these times elsewhere.
This commit is contained in:
Joshua Boniface 2023-12-06 13:20:18 -05:00
parent 79eb54d5da
commit d1e34e7333
1 changed files with 3 additions and 3 deletions

View File

@ -67,8 +67,8 @@ def generate_fault(
zkhandler.write(
[
(("faults.id", fault_id), ""),
(("faults.first_time", fault_id), str(fault_time)),
(("faults.last_time", fault_id), str(fault_time)),
(("faults.first_time", fault_id), str(fault_time).split(".")[0]),
(("faults.last_time", fault_id), str(fault_time).split(".")[0]),
(("faults.ack_time", fault_id), ""),
(("faults.status", fault_id), "new"),
(("faults.delta", fault_id), fault_delta),
@ -163,7 +163,7 @@ def acknowledge(zkhandler, fault_id):
zkhandler.write(
[
(("faults.ack_time", fault_id), datetime.now()),
(("faults.ack_time", fault_id), str(datetime.now()).split(".")[0]),
(("faults.status", fault_id), "ack"),
]
)