BE/PLG: TZ timestamp work #1251

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2025-11-03 10:19:39 +11:00
parent 4c92a941a8
commit 288427c939
9 changed files with 33 additions and 44 deletions

View File

@@ -59,7 +59,7 @@ class app_state_class:
previousState = ""
# Update self
self.lastUpdated = str(timeNowTZ())
self.lastUpdated = str(timeNowTZ().astimezone().isoformat())
if os.path.exists(stateFile):
try:
@@ -107,7 +107,7 @@ class app_state_class:
if pluginsStates is not None:
for plugin, state in pluginsStates.items():
if plugin in self.pluginsStates:
# Only update existing keys if both are dicts
# Only update existing keys if both are dicts
if isinstance(self.pluginsStates[plugin], dict) and isinstance(state, dict):
self.pluginsStates[plugin].update(state)
else: