# File lib/active_support/values/time_zone.rb, line 387 def [](arg) case arg when String if tz = zones_map[arg] tz elsif tz = lookup(arg) zones_map[arg] = tz end when Numeric, ActiveSupport::Duration arg *= 3600 if arg.abs <= 13 all.find { |z| z.utc_offset == arg.to_i } else raise ArgumentError, "invalid argument to TimeZone[]: #{arg.inspect}" end end