Build duration is wrong while build is running
There's an issue with build's elapsed time for builds not finished yet cause by an wrong logic in TimeHelper#duration_in_numbers
: it doesn't properly handle finished_at == nil
, resulting in calling Time.at(diff_in_seconds)
on a negative number...
The logic should be fixed and be similar as TimeHelper#duration_in_words
. Also, we should use ChronicDuration.output(diff_in_seconds, :format => :chrono)
instead of Time.at(diff_in_seconds).utc.strftime(time_format)
.