lib/flapjack/data/notification.rb in flapjack-1.3.0 vs lib/flapjack/data/notification.rb in flapjack-1.4.0rc1

- old
+ new

@@ -274,16 +274,16 @@ contact = options[:contact] def_tz = options[:default_timezone] return true if rule.time_restrictions.nil? or rule.time_restrictions.empty? - timezone = contact.timezone(:default => def_tz) - usertime = timezone.now + time_zone = contact.time_zone || def_tz + usertime = time_zone.now rule.time_restrictions.any? do |tr| - # add contact's timezone to the time restriction schedule + # add contact's time_zone to the time restriction schedule schedule = Flapjack::Data::NotificationRule. - time_restriction_to_icecube_schedule(tr, timezone, :logger => options[:logger]) + time_restriction_to_icecube_schedule(tr, time_zone, :logger => options[:logger]) schedule && schedule.occurring_at?(usertime) end end end