diff --git a/lib/auxiliary/time_helper.rb b/lib/auxiliary/time_helper.rb index 61971c2b..a1d1c5a5 100644 --- a/lib/auxiliary/time_helper.rb +++ b/lib/auxiliary/time_helper.rb @@ -16,5 +16,12 @@ def seconds_to_time(sec) def time_diff(start, finish) ((finish - start) * 24 * 60 * 60).to_i end + + def days_to_hours(time_str) + days, time = time_str.split('.') + hours, minutes, seconds = time.split(':').map(&:to_i) + total_hours = days.to_i * 24 + hours + "#{format('%02d', total_hours)}:#{format('%02d', minutes)}:#{format('%02d', seconds)}" + end end end diff --git a/lib/templates/report.html.erb b/lib/templates/report.html.erb index d75f7960..ab46a9fb 100644 --- a/lib/templates/report.html.erb +++ b/lib/templates/report.html.erb @@ -61,7 +61,7 @@ <%= test['name'] %> <% unless test['url'].nil? %><% end %> -