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