From 3db3501012f4c0a925603b897bf64e7bd65d42ab Mon Sep 17 00:00:00 2001 From: Martin Wiegand Date: Thu, 28 Feb 2019 18:45:23 +0100 Subject: [PATCH 1/2] Update cron_parser.rb use Time.now as default --- lib/cron_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cron_parser.rb b/lib/cron_parser.rb index 41a8a5e..ed87ddb 100644 --- a/lib/cron_parser.rb +++ b/lib/cron_parser.rb @@ -9,7 +9,7 @@ class InternalTime attr_accessor :year, :month, :day, :hour, :min attr_accessor :time_source - def initialize(time,time_source = Time) + def initialize(time = Time.now, time_source = Time) @year = time.year @month = time.month @day = time.day From 2199cbe228b2e9acc781fd6938c06b1f9bf1f9de Mon Sep 17 00:00:00 2001 From: Martin Wiegand Date: Wed, 20 Nov 2019 15:25:40 +0100 Subject: [PATCH 2/2] prefer Time.current over Time.now --- lib/cron_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cron_parser.rb b/lib/cron_parser.rb index ed87ddb..4e186a6 100644 --- a/lib/cron_parser.rb +++ b/lib/cron_parser.rb @@ -9,7 +9,7 @@ class InternalTime attr_accessor :year, :month, :day, :hour, :min attr_accessor :time_source - def initialize(time = Time.now, time_source = Time) + def initialize(time = Time.current, time_source = Time) @year = time.year @month = time.month @day = time.day