Fix time display for over 24 hours

This commit refactors the way time duration is displayed when it is
greater then 24 hours, as in the total time over a week.