import time
djsj_str="2020-05-22 15:30:29" #a 冻结时间字符串
djsc =7*24*60*60
#b 冻结时长 7天
t1
=time.strptime(djsj_str,"%Y-%m-%d %H:%M:%S")
t2
=time.mktime(t1)
#冻结时间点的时间戳
while True:
dqsj =time.time()
#当前时间
ygsj =dqsj-t2
#已过时间=当前时间 - 冻结时间
sysj =djsc -ygsj
#剩余时间
hour =60*60
day
=24*60*60
tian =sysj//day
xiaoshi =sysj%day//hour
fenzhong=sysj%hour//60
miao =sysj%60
print("还有{}天{}小时{}分钟{}秒解冻".format(
int(tian),
int(xiaoshi),
int(fenzhong),
int(miao)
) )
time.sleep(1)
# x=time.localtime(522293)
# print(x)
银行卡冻结时间
内容版权声明:除非注明,否则皆为本站原创文章。