Given the following example:
seconds = totalTime % 60
minutes = (totalTime - seconds) % (60 ** 2)
hours = (totalTime - (minutes * 60)) / (60 ** 2)
finalTime = '{0:.0f}h {1:.0f}m {2:.0f}s'.format(hours, minutes, seconds)
When I set totalTime to 7000 for example (a little under two hours), I get the following in return:
-55h 3360m 39s
Huh!? This happens with any number numbers i give it… Heres one more example if it help:
totalTime = 10000
-44h 2760m 39s
You are measuring the minutes in seconds. To fix your code, you should divide
minutesby 60:However, there are much easier ways to do this, for example