Don't provide default date when schedule is unset

This commit is contained in:
wvengen 2014-12-31 14:24:55 +01:00
parent 6272816358
commit 3e6a882268

View file

@ -6,8 +6,6 @@ module FoodsoftDateUtil
schedule.add_recurrence_rule rule_from(options[:recurr]) schedule.add_recurrence_rule rule_from(options[:recurr])
# @todo handle ical parse errors # @todo handle ical parse errors
occ = (schedule.next_occurrence(from).to_time rescue nil) occ = (schedule.next_occurrence(from).to_time rescue nil)
else
occ = start
end end
if occ and options[:time] if occ and options[:time]
occ = occ.beginning_of_day.advance(seconds: Time.parse(options[:time]).seconds_since_midnight) occ = occ.beginning_of_day.advance(seconds: Time.parse(options[:time]).seconds_since_midnight)