now = datetime.datetime.now()
#转换成秒数计算相差seconds = (create_time- now ).total_seconds() #total_seconds() 可以将时间转换成秒数进行计算 传入的参数必须是时间类型