diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2019-06-05 13:44:17 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-06-05 13:44:17 +0000 |
commit | 690c4259a90e4b52c4107edabdeff60b4e05d264 (patch) | |
tree | f31f451a8a2f84a3412ea432d2930fe5da8f9d9f | |
parent | cb18dfea0505f47062096e05eda8f74111c1fc39 (diff) | |
download | gitlab-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.rb | 2 |
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 |