This question already has an answer here:
In python how can I simply convert an integer of seconds into (h:m:s) using the datetime module?
i.e. 500000 ---> 138:53:20
Please, no tuple hackery.
Belphegor
Maybe this answer from SO will do:
>>> import datetime
>>> str(datetime.timedelta(seconds=500000))
'5 days, 18:53:20'
来源:https://stackoverflow.com/questions/25193464/convert-seconds-to-datetime-timedelta