Use the datetime
module. For example, if the number of microseconds in questions is 10**16:
>>> datetime.datetime(1601, 1, 1) + datetime.timedelta(microseconds=1e16)
datetime.datetime(1917, 11, 21, 17, 46, 40)
>>> _.isoformat()
'1917-11-21T17:46:40'
this tells you it was just past a quarter to 6pm of November 21, 1917. You can format datetime
objects in any way you want thanks to their strftime
method, of course. If you also need to apply timezones (other than the UTC you start with), look at third-party module pytz.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…