1.时间戳to时间
def dateTrans(unixtime): dt = datetime.datetime.fromtimestamp(unixtime).strftime(‘%Y-%m-%d %H:%M:%S‘) return dt print dateTrans(1493646936)
时间: 2024-11-02 10:01:35
1.时间戳to时间
def dateTrans(unixtime): dt = datetime.datetime.fromtimestamp(unixtime).strftime(‘%Y-%m-%d %H:%M:%S‘) return dt print dateTrans(1493646936)