diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-19 09:08:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-19 09:08:03 +0300 |
commit | 4e81d9c050bfea4c866329155c17b929d7381340 (patch) | |
tree | 70fd5d3445f0b285650e068a6e99e970ceee5e00 /app/services/resource_events | |
parent | fdfde5a37a82274d7babf2519fc802c03e728622 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/resource_events')
-rw-r--r-- | app/services/resource_events/base_synthetic_notes_builder_service.rb | 2 | ||||
-rw-r--r-- | app/services/resource_events/change_milestone_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/resource_events/base_synthetic_notes_builder_service.rb b/app/services/resource_events/base_synthetic_notes_builder_service.rb index 1b85ca811a1..db8bf6e4b74 100644 --- a/app/services/resource_events/base_synthetic_notes_builder_service.rb +++ b/app/services/resource_events/base_synthetic_notes_builder_service.rb @@ -26,7 +26,7 @@ module ResourceEvents def since_fetch_at(events) return events unless params[:last_fetched_at].present? - last_fetched_at = Time.at(params.fetch(:last_fetched_at).to_i) + last_fetched_at = Time.zone.at(params.fetch(:last_fetched_at).to_i) events.created_after(last_fetched_at - NotesFinder::FETCH_OVERLAP) end diff --git a/app/services/resource_events/change_milestone_service.rb b/app/services/resource_events/change_milestone_service.rb index f09c2e1d735..82c3e2acad5 100644 --- a/app/services/resource_events/change_milestone_service.rb +++ b/app/services/resource_events/change_milestone_service.rb @@ -4,7 +4,7 @@ module ResourceEvents class ChangeMilestoneService attr_reader :resource, :user, :event_created_at, :milestone, :old_milestone - def initialize(resource, user, created_at: Time.now, old_milestone:) + def initialize(resource, user, created_at: Time.current, old_milestone:) @resource = resource @user = user @event_created_at = created_at |