python 几小时前\几分前换算时间戳
1.几小时前换算时间戳
now_time = int(time.time())
print(now_time)
timeArray = datetime.datetime.utcfromtimestamp(time_now1)
print(timeArray)
# 加8小时时区,再减几小时前时间
datetime = timeArray +(datetime.timedelta(hours=8)) - datetime.timedelta(hours=3)
print(datetime)