summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-06-11 16:09:38 +0000
committerRémy Coutable <remy@rymai.me>2019-06-11 16:09:38 +0000
commitf8abc06ee5699daca80db7b5c74927f28416e655 (patch)
tree97ef09cb6159fecf8344bd4b327b2cecd820762c
parentd6446335dafb71cc43bf3a04300729d5ad563adf (diff)
downloadgitlab-ce-f8abc06ee5699daca80db7b5c74927f28416e655.tar.gz
Use Time.zone.now for Ci::PipelineSchedule#ideal_next_run_at
-rw-r--r--app/models/ci/pipeline_schedule.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/pipeline_schedule.rb b/app/models/ci/pipeline_schedule.rb
index c40ad39be61..6a4241c94bc 100644
--- a/app/models/ci/pipeline_schedule.rb
+++ b/app/models/ci/pipeline_schedule.rb
@@ -73,7 +73,8 @@ module Ci
private
def ideal_next_run_at
- Gitlab::Ci::CronParser.new(cron, cron_timezone).next_time_from(Time.now)
+ Gitlab::Ci::CronParser.new(cron, cron_timezone)
+ .next_time_from(Time.zone.now)
end
end
end