diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-05-12 07:49:10 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-05-12 07:49:10 +0000 |
commit | f84e78f3d750776793371940803b7ff781050f09 (patch) | |
tree | fe4769571008e77d408f0a7af56ec60573990a09 /app/helpers | |
parent | 9694c8164d8d1ad95fcabe25fb6559e22e9213bc (diff) | |
parent | 2a3c1d7cdda27c1365d62b5528b60b9f90e7d702 (diff) | |
download | gitlab-ce-f84e78f3d750776793371940803b7ff781050f09.tar.gz |
Merge branch 'commit_time_timezone' into 'master'
Fix commit time being displayed in the wrong timezone in some cases
This MR makes sure that the displayed commit date is shown in the timezone that's configured in the gitlab.yml.
Before it was possible that the `committed_date` of a commit would display different values on the dashboard and the commit page.
fixes gitlab-org/gitlab-ce#1278
/cc @DouweM
See merge request !624
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6e86400a4f6..672be54e66f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -214,7 +214,7 @@ module ApplicationHelper def time_ago_with_tooltip(date, placement = 'top', html_class = 'time_ago') capture_haml do haml_tag :time, date.to_s, - class: html_class, datetime: date.getutc.iso8601, title: date.stamp('Aug 21, 2011 9:23pm'), + class: html_class, datetime: date.getutc.iso8601, title: date.in_time_zone.stamp('Aug 21, 2011 9:23pm'), data: { toggle: 'tooltip', placement: placement } haml_tag :script, "$('." + html_class + "').timeago().tooltip()" |