This commit is contained in:
2026-02-24 14:57:24 +00:00
parent 6f7fc56e32
commit 96960c17a1

View File

@@ -32,8 +32,11 @@ data = get_data()
if data is None or data["noshutdown"] == 1:
exit
time = datetime.strptime(data["time"], "%H:%M").time()
now = datetime.now().time()
def to_seconds(t):
return t.hour * 3600 + t.minute * 60 + t.second
time = to_seconds(datetime.strptime(data["time"], "%H:%M").time())
now = to_seconds(datetime.now().time())
print(time)
print(now)
print(now - time)