def cal_remind_time(memTimes, types):
curTime = int(time.time())
remindTime = {
0: curTime + (60 * 0), # back end import always 0 minute, request from @smilebin818
1: curTime + (60 * 30), # 30 minutes
2: curTime + (60 * 60 * 12), # 12 hours
3: curTime + (60 * 60 * 24), # 1 day
4: curTime + (60 * 60 * 24 * 2), # 2 days
5: curTime + (60 * 60 * 24 * 4), # 4 days
6: curTime + (60 * 60 * 24 * 7), # 7 days
7: curTime + (60 * 60 * 24 * 15), # 15 days
}.get(memTimes, curTime)
if types == "int":
remindTime = remindTime
elif types == "str":
remindTime = time.strftime('%Y-%m-%d %H:%M:%S +0800', time.localtime(remindTime))
return remindTime
评论列表
文章目录