Closed Rubo3 closed 3 years ago
The format is different. While being language neuter when less than one day, it's less readable. And it's weird to use different format for days and the remaining.
I see, and what about something like this?
time.strftime("%Hh%Mm%Ss", time.gmtime(4*3600+13*60+6)) # '04h13m06s'
I think something could be done with days, too. Let me take a look.
On Tue, Dec 15, 2020 at 12:25:44AM -0800, Marco Rubin wrote:
I see, and what about something like this?
time.strftime("%Hh%Mm%Ss", time.gmtime(4*3600+13*60+6)) # '04h13m06s'
It's a weird way to format intervals. gmtime and strftime are for calendar times.
-- Best regards, lilydjwg
It seems the standard library prefers the hh:mm:ss
, not dd:hh:mm:ss
. What a pity.
I think it would be better to let the standard library do the job of calculating the elapsed time instead of writing a custom function which does the same job. What are your thoughts on this matter?