Python3转换时间戳为可读日期
>>> import datetime >>> >>> a = 1614851596 >>> >>> b = datetime.datetime.utcfromtimestamp(a) >>> >>> b.strftime("%Y-%m-%d %H:%M:%S") '2021-03-04 09:53:16' >>>
>>> import datetime >>> >>> a = 1614851596 >>> >>> b = datetime.datetime.utcfromtimestamp(a) >>> >>> b.strftime("%Y-%m-%d %H:%M:%S") '2021-03-04 09:53:16' >>>