Commit b6e99072 authored by Romain Courteaud's avatar Romain Courteaud

Improve date stdout

parent 74e39c3d
...@@ -105,7 +105,7 @@ class WebBot: ...@@ -105,7 +105,7 @@ class WebBot:
# Report the bot status # Report the bot status
print("# STATUS") print("# STATUS")
status = reportStatus(self._db).get() 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 # Report the list of DNS server status
query = reportNetwork( query = reportNetwork(
...@@ -123,7 +123,7 @@ class WebBot: ...@@ -123,7 +123,7 @@ class WebBot:
" ", " ",
network_change["ip"], network_change["ip"],
network_change["state"], network_change["state"],
network_change["timestamp"], network_change["timestamp"].isoformat(timespec="minutes"),
) )
if not resolver_ip_list: if not resolver_ip_list:
...@@ -144,7 +144,7 @@ class WebBot: ...@@ -144,7 +144,7 @@ class WebBot:
" ", " ",
dns_change["domain"], dns_change["domain"],
dns_change["resolver_ip"], dns_change["resolver_ip"],
dns_change["timestamp"], dns_change["timestamp"].isoformat(timespec="minutes"),
dns_change["response"], dns_change["response"],
) )
for server_ip in dns_change["response"].split(", "): for server_ip in dns_change["response"].split(", "):
...@@ -171,7 +171,7 @@ class WebBot: ...@@ -171,7 +171,7 @@ class WebBot:
network_change["ip"], network_change["ip"],
network_change["state"], network_change["state"],
network_change["port"], network_change["port"],
network_change["timestamp"], network_change["timestamp"].isoformat(timespec="minutes"),
", ".join(server_ip_dict[network_change["ip"]]), ", ".join(server_ip_dict[network_change["ip"]]),
) )
if network_change["state"] == "open": if network_change["state"] == "open":
...@@ -204,7 +204,7 @@ class WebBot: ...@@ -204,7 +204,7 @@ class WebBot:
network_change["status_code"], network_change["status_code"],
network_change["url"], network_change["url"],
network_change["ip"], network_change["ip"],
network_change["timestamp"], network_change["timestamp"].isoformat(timespec="minutes"),
) )
def stop(self): 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