diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-19 09:10:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-19 09:10:04 +0300 |
commit | 0bfb62457ba5122c9bf30bed3ecd20759a9a16bd (patch) | |
tree | 8e18296b4f9b889df037dd07d634884a7566ed8c /lib/gitlab | |
parent | 7fdacd20dec0db3507643c7e89e9f3d35892adef (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/incident_management/pager_duty/incident_issue_description.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/usage_data.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/utils/usage_data.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/incident_management/pager_duty/incident_issue_description.rb b/lib/gitlab/incident_management/pager_duty/incident_issue_description.rb index cd947b15154..768c8bb4cbb 100644 --- a/lib/gitlab/incident_management/pager_duty/incident_issue_description.rb +++ b/lib/gitlab/incident_management/pager_duty/incident_issue_description.rb @@ -32,7 +32,7 @@ module Gitlab end def incident_created_at - Time.parse(incident_payload['created_at']) + Time.zone.parse(incident_payload['created_at']) rescue Time.current.utc # PagerDuty provides time in UTC end diff --git a/lib/gitlab/usage_data.rb b/lib/gitlab/usage_data.rb index f6914389637..73a80155dbc 100644 --- a/lib/gitlab/usage_data.rb +++ b/lib/gitlab/usage_data.rb @@ -58,7 +58,7 @@ module Gitlab end def recorded_at - Time.now + Time.current end # rubocop: disable Metrics/AbcSize diff --git a/lib/gitlab/utils/usage_data.rb b/lib/gitlab/utils/usage_data.rb index 625e1076a54..36046ca14bf 100644 --- a/lib/gitlab/utils/usage_data.rb +++ b/lib/gitlab/utils/usage_data.rb @@ -93,7 +93,7 @@ module Gitlab end def with_finished_at(key, &block) - yield.merge(key => Time.now) + yield.merge(key => Time.current) end private |