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"""