a
This commit is contained in:
@@ -32,8 +32,11 @@ data = get_data()
|
|||||||
if data is None or data["noshutdown"] == 1:
|
if data is None or data["noshutdown"] == 1:
|
||||||
exit
|
exit
|
||||||
|
|
||||||
time = datetime.strptime(data["time"], "%H:%M").time()
|
def to_seconds(t):
|
||||||
now = datetime.now().time()
|
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(time)
|
||||||
print(now)
|
print(now)
|
||||||
print(now - time)
|
print(now - time)
|
||||||
|
|||||||
Reference in New Issue
Block a user