class Rufus::Scheduler

def self.parse_at(o, opts={})

def self.parse_at(o, opts={})
  return o if o.is_a?(Time)
  tz = nil
  s =
    o.to_s.gsub(TZ_REGEX) { |m|
      t = TZInfo::Timezone.get(m) rescue nil
      tz ||= t
      t ? '' : m
    }
  begin
    DateTime.parse(o)
  rescue
    raise ArgumentError, "no time information in #{o.inspect}"
  end if RUBY_VERSION < '1.9.0'
  t = Time.parse(s)
  t = tz.local_to_utc(t) if tz
  t
rescue StandardError => se
  return nil if opts[:no_error]
  raise se
end