from datetime import datetime, time
# 获取当前时间
now = datetime.now().time()
# 设置早上八点半的时间
eight_thirty_am = time(hour=16, minute=37)
# 判断当前时间是否超过早上八点半
if now >= eight_thirty_am:
print("已经超过设定的时间!")
else:
print("还未超过设定的时间。")
上一篇

使用Pycharm调用Docker中的Python解释器
2020-02-18
下一篇

sqlist3数据库读写
2020-02-18