From 7087c2356c32dbd6ccb199abdc1f7b07665b50bd Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 27 Nov 2025 11:54:52 +0000 Subject: [PATCH] fix query_server_time --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ee79db1..312e052 100644 --- a/main.py +++ b/main.py @@ -367,7 +367,8 @@ class GadgetbridgeMQTTPublisher: def query_server_time(self, cursor) -> Any: """Return current server time in ISO 8601 format for Home Assistant timestamp""" - return datetime.now().isoformat() + # .astimezone() adds the system's local timezone offset (e.g., +01:00) + return datetime.now().astimezone().isoformat() def get_sensor_data(self) -> Dict[str, Any]: """Query all sensors and return their values as a dict"""