format duration into HH:MM:SS