From 80db01491f4074f44333c5f1854888b3763510d5 Mon Sep 17 00:00:00 2001 From: Bob Van Landuyt Date: Thu, 15 Jun 2017 14:29:11 +0200 Subject: Take timezone into account when comparing dates in the UI --- config/locales/en.yml | 2 +- spec/features/dashboard/datetime_on_tooltips_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 2f21a907154..8932db138d9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -248,5 +248,5 @@ en: default: "%a, %d %b %Y %H:%M:%S %z" long: "%B %d, %Y %H:%M" short: "%d %b %H:%M" - timeago_tooltip: "%b %-d, %Y %-k:%M%P" + timeago_tooltip: "%b %-d, %Y %-l:%M%P" pm: pm diff --git a/spec/features/dashboard/datetime_on_tooltips_spec.rb b/spec/features/dashboard/datetime_on_tooltips_spec.rb index 1793e323588..5296297304e 100644 --- a/spec/features/dashboard/datetime_on_tooltips_spec.rb +++ b/spec/features/dashboard/datetime_on_tooltips_spec.rb @@ -4,7 +4,7 @@ feature 'Tooltips on .timeago dates', feature: true, js: true do let(:user) { create(:user) } let(:project) { create(:project, name: 'test', namespace: user.namespace) } let(:created_date) { Date.yesterday.to_time } - let(:expected_format) { created_date.strftime('%b %-d, %Y %l:%M%P') } + let(:expected_format) { created_date.in_time_zone.strftime('%b %-d, %Y %l:%M%P') } context 'on the activity tab' do before do -- cgit v1.2.1