diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9c5ac59ad..10f23b3a0 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -103,9 +103,10 @@ module ApplicationHelper end def duration_to_hhmmss(seconds) + seconds = seconds.round hh = seconds.div(1.hour).to_s mm = seconds.div(1.minute).to_s - ss = "%.2d" % (seconds.round % 1.minute) + ss = "%.2d" % (seconds % 1.minute) if seconds >= 1.hour "#{hh}:#{mm}:#{ss}"