Commit f84e78f3 authored by Douwe Maan's avatar Douwe Maan

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
parents 9694c816 2a3c1d7c
...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
v 7.11.0 (unreleased) v 7.11.0 (unreleased)
- Don't show duplicate deploy keys - Don't show duplicate deploy keys
- Fix commit time being displayed in the wrong timezone in some cases (Hannes Rosenögger)
- Make the first branch pushed to an empty repository the default HEAD (Stan Hu) - Make the first branch pushed to an empty repository the default HEAD (Stan Hu)
- Make Reply-To config apply to change e-mail confirmation and other Devise notifications (Stan Hu) - Make Reply-To config apply to change e-mail confirmation and other Devise notifications (Stan Hu)
- Add application setting to restrict user signups to e-mail domains (Stan Hu) - Add application setting to restrict user signups to e-mail domains (Stan Hu)
......
...@@ -214,7 +214,7 @@ module ApplicationHelper ...@@ -214,7 +214,7 @@ module ApplicationHelper
def time_ago_with_tooltip(date, placement = 'top', html_class = 'time_ago') def time_ago_with_tooltip(date, placement = 'top', html_class = 'time_ago')
capture_haml do capture_haml do
haml_tag :time, date.to_s, 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 } data: { toggle: 'tooltip', placement: placement }
haml_tag :script, "$('." + html_class + "').timeago().tooltip()" haml_tag :script, "$('." + html_class + "').timeago().tooltip()"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment