Commit b6e99072 authored by Romain Courteaud's avatar Romain Courteaud

Improve date stdout

parent 74e39c3d
......@@ -105,7 +105,7 @@ class WebBot:
# Report the bot status
print("# STATUS")
status = reportStatus(self._db).get()
print(" ", status.text, status.timestamp)
print(" ", status.text, status.timestamp.isoformat(timespec="minutes"))
# Report the list of DNS server status
query = reportNetwork(
......@@ -123,7 +123,7 @@ class WebBot:
" ",
network_change["ip"],
network_change["state"],
network_change["timestamp"],
network_change["timestamp"].isoformat(timespec="minutes"),
)
if not resolver_ip_list:
......@@ -144,7 +144,7 @@ class WebBot:
" ",
dns_change["domain"],
dns_change["resolver_ip"],
dns_change["timestamp"],
dns_change["timestamp"].isoformat(timespec="minutes"),
dns_change["response"],
)
for server_ip in dns_change["response"].split(", "):
......@@ -171,7 +171,7 @@ class WebBot:
network_change["ip"],
network_change["state"],
network_change["port"],
network_change["timestamp"],
network_change["timestamp"].isoformat(timespec="minutes"),
", ".join(server_ip_dict[network_change["ip"]]),
)
if network_change["state"] == "open":
......@@ -204,7 +204,7 @@ class WebBot:
network_change["status_code"],
network_change["url"],
network_change["ip"],
network_change["timestamp"],
network_change["timestamp"].isoformat(timespec="minutes"),
)
def stop(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment