Seconds since epoch to relative date
问题 I'm working with dates since epoch, and already got, for example: date = 6928727.56235 I'd like to transform this into another relative format, so that I'll be able to transform this into something relative to epoch. Using time.gmtime(date), it returned year=1970, mon=3, day=22, hour=4, min=38, sec=47 I think epoch starts in '01/01/1970 00:00:00', so the method should return the relative date in something like: '2 months 21 days 04:38:47' Anything that help? 回答1: from datetime import