summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-06-05 13:44:17 +0000
committerNick Thomas <nick@gitlab.com>2019-06-05 13:44:17 +0000
commit690c4259a90e4b52c4107edabdeff60b4e05d264 (patch)
treef31f451a8a2f84a3412ea432d2930fe5da8f9d9f
parentcb18dfea0505f47062096e05eda8f74111c1fc39 (diff)
downloadgitlab-ce-690c4259a90e4b52c4107edabdeff60b4e05d264.tar.gz
Prefer Time.zone.now to pair with Time.zone.name
`Time.now` is local time, yet `Time.zone.now` is application configuration time. They can be different.
-rw-r--r--spec/models/ci/pipeline_schedule_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_schedule_spec.rb b/spec/models/ci/pipeline_schedule_spec.rb
index 6382be73ea7..9a6471557ea 100644
--- a/spec/models/ci/pipeline_schedule_spec.rb
+++ b/spec/models/ci/pipeline_schedule_spec.rb
@@ -97,7 +97,7 @@ describe Ci::PipelineSchedule do
let(:cron_worker_next_run_at) do
Gitlab::Ci::CronParser.new(Settings.cron_jobs['pipeline_schedule_worker']['cron'], Time.zone.name)
- .next_time_from(Time.now)
+ .next_time_from(Time.zone.now)
end
context 'when creates new pipeline schedule' do