I originally made this code to convert a date to human readable time:
a = datetime.datetime.strptime(time, "%Y-%m-%d %H:%M:%S.%f") b = datetime.datetime.now() c = b - a days, hours, minutes, seconds = int(c.days), int(c.seconds // 3600), int(c.seconds % 3600 / 60.0), int(c.seconds % 60.0) return days, hours, minutes, seconds EXAMPLE OUTPUT: 1 days, 4 hours, 24 minutes, 37 seconds
and I'm trying to do this using epoch time, but I have no idea for him to calculate days, etc.
a = last_epoch
source share