更新 随机选人-tk - 作业版-s.py
This commit is contained in:
parent
e5da8b389a
commit
3e6e4fc9ce
@ -241,9 +241,12 @@ def rest():
|
||||
listindes = sheet.col_values(index)
|
||||
for x in range(1, len(listindes)):
|
||||
a = listindes[x].split('-')
|
||||
start_time = datetime.datetime.strptime(str(datetime.datetime.now().date()) + a[0], '%Y-%m-%d%H:%M')
|
||||
end_time = datetime.datetime.strptime(str(datetime.datetime.now().date()) + a[1], '%Y-%m-%d%H:%M')
|
||||
now_time = datetime.datetime.now()
|
||||
try:
|
||||
start_time = datetime.datetime.strptime(str(datetime.datetime.now().date()) + a[0], '%Y-%m-%d%H:%M')
|
||||
end_time = datetime.datetime.strptime(str(datetime.datetime.now().date()) + a[1], '%Y-%m-%d%H:%M')
|
||||
now_time = datetime.datetime.now()
|
||||
except:
|
||||
return False
|
||||
if start_time < now_time < end_time:
|
||||
return True
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user