diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-10-01 12:55:09 +0200 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2018-10-02 17:08:14 +0200 |
commit | 786ae683679d90a0e55bfe844ac694aeb7d68ce6 (patch) | |
tree | 96dce39cab69c121adfa21b177e8b0808c36af98 /app/helpers/time_helper.rb | |
parent | 6369ff1ce172cefc84574f2dde055399b64bf7b5 (diff) | |
download | gitlab-ce-786ae683679d90a0e55bfe844ac694aeb7d68ce6.tar.gz |
Do not omit leading zeros in duration_in_numbers helper
Diffstat (limited to 'app/helpers/time_helper.rb')
-rw-r--r-- | app/helpers/time_helper.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/helpers/time_helper.rb b/app/helpers/time_helper.rb index 737ec33b2dd..3e6a301b77d 100644 --- a/app/helpers/time_helper.rb +++ b/app/helpers/time_helper.rb @@ -27,11 +27,7 @@ module TimeHelper minutes = (duration_in_seconds / 1.minute) % (1.hour / 1.minute) hours = duration_in_seconds / 1.hour - if hours == 0 - "%02d:%02d" % [minutes, seconds] - else - "%02d:%02d:%02d" % [hours, minutes, seconds] - end + "%02d:%02d:%02d" % [hours, minutes, seconds] else time_format = duration_in_seconds < 1.hour ? "%M:%S" : "%H:%M:%S" |