lib/rufus/scheduler/zotime.rb in rufus-scheduler-3.1.0 vs lib/rufus/scheduler/zotime.rb in rufus-scheduler-3.1.1

- old
+ new

@@ -121,18 +121,19 @@ def self.is_timezone?(str) return false if str == nil return true if Time.zone_offset(str) - return true if str == 'Zulu' + return true if str == 'Zulu' || str == 'UTC' return !! (::TZInfo::Timezone.get(str) rescue nil) if defined?(::TZInfo) - zt = ZoTime.new(0, str) - t = zt.time + t = ZoTime.new(0, str).time return false if t.zone == '' + return false if t.zone == 'UTC' return false if str.match(/[a-z]/) && str.start_with?(t.zone) + # 3 common fallbacks... return false if RUBY_PLATFORM.include?('java') && ! envtzable?(str) true end