22 lines
614 B
Python
22 lines
614 B
Python
import datetime
|
|
import time
|
|
#print (now.strftime("%Y-%m-%d %H:%M"))
|
|
|
|
data = "2022-12-09"
|
|
czas = "13:52"
|
|
|
|
|
|
def check(date, inputTime):
|
|
strDate = date.split('-')
|
|
strTime = inputTime.split(':')
|
|
isPlayed = False
|
|
while True:
|
|
now = datetime.datetime.now()
|
|
if isPlayed == False and int(strDate[0]) == int(now.year) and int(strDate[1]) == int(now.month) and int(strDate[2]) == int(now.day) and int(strTime[0]) == int(now.hour) and int(strTime[1]) == int(now.minute):
|
|
isPlayed =True
|
|
print (now.strftime("%Y-%m-%d %H:%M:%S"))
|
|
time.sleep(1)
|
|
|
|
check(data, czas)
|
|
|