From 12e9b3552ea99251961709eb3773c701e2c7aad8 Mon Sep 17 00:00:00 2001 From: Namonay Date: Thu, 26 Mar 2026 13:29:18 +0000 Subject: [PATCH] fix: remove millisecs --- server/src/data/app.py | 2 +- server/src/data/templates/index.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/data/app.py b/server/src/data/app.py index 9b5751c..4b3bccd 100644 --- a/server/src/data/app.py +++ b/server/src/data/app.py @@ -128,7 +128,7 @@ def lookup(): default_time_row = cursor.fetchone() default_time = default_time_row[0] if default_time_row else DEFAULT_TIME if item: - cursor.execute("UPDATE items SET last_connection = ? WHERE name = ?", (datetime.now(), item["name"])) + cursor.execute("UPDATE items SET last_connection = ? WHERE name = ?", (datetime.now().replace(microseconds=0), item["name"])) conn.commit() conn.close() diff --git a/server/src/data/templates/index.html b/server/src/data/templates/index.html index 0368984..5924ae3 100644 --- a/server/src/data/templates/index.html +++ b/server/src/data/templates/index.html @@ -84,7 +84,9 @@ {{ item.name }}
- {{ item.last_connection }} + {% if item.last_connection %} + {{ item.last_connection }} + {% endif %}
{% if item.noshutdown == 1 %}