From b3070a8b8bf7c11ec8004ec16c466bb01631ecb1 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 16 Nov 2024 14:14:05 +0100 Subject: [PATCH] bundles/infobeamer-monitor: announce online devices at 09:00 CE(S)T --- bundles/infobeamer-monitor/files/monitor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/infobeamer-monitor/files/monitor.py b/bundles/infobeamer-monitor/files/monitor.py index 2aa2daf..5a253e3 100644 --- a/bundles/infobeamer-monitor/files/monitor.py +++ b/bundles/infobeamer-monitor/files/monitor.py @@ -1,9 +1,10 @@ #!/usr/bin/env python3 import logging -from datetime import datetime, timezone +from datetime import datetime from json import dumps from time import sleep +from zoneinfo import ZoneInfo import paho.mqtt.client as mqtt from requests import RequestException, get @@ -210,7 +211,7 @@ while True: level="WARN", ) - if datetime.now(timezone.utc).strftime("%H%M") == "1312": + if datetime.now(ZoneInfo("Europe/Berlin")).strftime("%H%M") == "0900": if available_credits is not None: mqtt_out(f"Available Credits: {available_credits}")