From 2ca87eb847fc5c784cf92910f2bba2bfa2aeca6b Mon Sep 17 00:00:00 2001 From: l5y <220195275+l5yth@users.noreply.github.com> Date: Sun, 14 Sep 2025 17:52:54 +0200 Subject: [PATCH] refactor: replace deprecated utcfromtimestamp (#30) --- data/mesh.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/data/mesh.py b/data/mesh.py index 8423359..b013ab5 100644 --- a/data/mesh.py +++ b/data/mesh.py @@ -89,7 +89,11 @@ def upsert_node(node_id, n): # --- Message logging via PubSub ----------------------------------------------- def _iso(ts: int | float) -> str: import datetime - return datetime.datetime.utcfromtimestamp(int(ts)).isoformat() + "Z" + return ( + datetime.datetime.fromtimestamp(int(ts), datetime.UTC) + .isoformat() + .replace("+00:00", "Z") + ) def _first(d: dict, *names, default=None): """Return first present key from names (supports nested 'a.b' lookups)."""