summaryrefslogtreecommitdiff
path: root/app/serializers/entity_date_helper.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-11-22 15:05:37 +0100
committerJames Lopez <james@jameslopez.es>2016-11-22 15:05:37 +0100
commitdb62eb957157ffe14a474f5f858c753cade067b1 (patch)
tree3b3c3930fd49c3b338010e5bc23280d684d2426c /app/serializers/entity_date_helper.rb
parentb1b5060dbad15975184ec20a1914c7c48fc804db (diff)
downloadgitlab-ce-db62eb957157ffe14a474f5f858c753cade067b1.tar.gz
fixed bug to do with calculating durations
Diffstat (limited to 'app/serializers/entity_date_helper.rb')
-rw-r--r--app/serializers/entity_date_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/entity_date_helper.rb b/app/serializers/entity_date_helper.rb
index b333b3344c3..918abba8d99 100644
--- a/app/serializers/entity_date_helper.rb
+++ b/app/serializers/entity_date_helper.rb
@@ -2,7 +2,7 @@ module EntityDateHelper
include ActionView::Helpers::DateHelper
def interval_in_words(diff)
- "#{distance_of_time_in_words(diff.to_f)} ago"
+ "#{distance_of_time_in_words(Time.now, diff)} ago"
end
# Converts seconds into a hash such as: