Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-03-31 13:08:39 +0300
committerShinya Maeda <gitlab.shinyamaeda@gmail.com>2017-04-06 17:46:58 +0300
commitd65c816ed78910eabd7ecbc9282e85d6b6f21796 (patch)
tree2b9bd6642ec62484b783f5b6c38c1471c7a3b405 /lib
parent9573bb44bc94261814dbdbb384b9ad7acf2907ff (diff)
Brush up
Diffstat (limited to 'lib')
-rw-r--r--lib/ci/cron_parser.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/ci/cron_parser.rb b/lib/ci/cron_parser.rb
index a569de293b3..2919543bbef 100644
--- a/lib/ci/cron_parser.rb
+++ b/lib/ci/cron_parser.rb
@@ -8,10 +8,13 @@ module Ci
@cron_time_zone = cron_time_zone
end
- def next_time_from_now
+ def next_time_from(time)
cronLine = try_parse_cron(@cron, @cron_time_zone)
- return nil unless cronLine.present?
- cronLine.next_time
+ if cronLine.present?
+ cronLine.next_time(time)
+ else
+ nil
+ end
end
def validation