a
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user