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:
parent
79eb54d5da
commit
d1e34e7333
|
@ -67,8 +67,8 @@ def generate_fault(
|
||||||
zkhandler.write(
|
zkhandler.write(
|
||||||
[
|
[
|
||||||
(("faults.id", fault_id), ""),
|
(("faults.id", fault_id), ""),
|
||||||
(("faults.first_time", fault_id), str(fault_time)),
|
(("faults.first_time", fault_id), str(fault_time).split(".")[0]),
|
||||||
(("faults.last_time", fault_id), str(fault_time)),
|
(("faults.last_time", fault_id), str(fault_time).split(".")[0]),
|
||||||
(("faults.ack_time", fault_id), ""),
|
(("faults.ack_time", fault_id), ""),
|
||||||
(("faults.status", fault_id), "new"),
|
(("faults.status", fault_id), "new"),
|
||||||
(("faults.delta", fault_id), fault_delta),
|
(("faults.delta", fault_id), fault_delta),
|
||||||
|
@ -163,7 +163,7 @@ def acknowledge(zkhandler, fault_id):
|
||||||
|
|
||||||
zkhandler.write(
|
zkhandler.write(
|
||||||
[
|
[
|
||||||
(("faults.ack_time", fault_id), datetime.now()),
|
(("faults.ack_time", fault_id), str(datetime.now()).split(".")[0]),
|
||||||
(("faults.status", fault_id), "ack"),
|
(("faults.status", fault_id), "ack"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue