formatted_offset

formatted_offset(colon=true, alternate_utc_string = nil) Instance Public methods Returns the offset of this time zone as a formatted string, of the format â+HH:MMâ.

at

at(secs) Instance Public methods Method for creating new ActiveSupport::TimeWithZone instance in time zone of self from number of seconds since the Unix epoch. Time.zone = 'Hawaii' # => "Hawaii" Time.utc(2000).to_f # => 946684800.0 Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00

=~

=~(re) Instance Public methods Compare name and TZInfo identifier to a supplied regexp, returning true if a match is found.

<=>

<=>(zone) Instance Public methods Compare this time zone to the parameter. The two are compared first on their offsets, and then by name.

zones_map

zones_map() Class Public methods

us_zones

us_zones() Class Public methods A convenience method for returning a collection of TimeZone objects for time zones in the USA.

seconds_to_utc_offset

seconds_to_utc_offset(seconds, colon = true) Class Public methods Assumes self represents an offset from UTC in seconds (as returned from Time#utc_offset) and turns this into an +HH:MM formatted string. TimeZone.seconds_to_utc_offset(-21_600) # => "-06:00"

new 2

new(name) Class Public methods Returns a TimeZone instance with the given name, or nil if no such TimeZone instance exists. (This exists to support the use of this class with the composed_of macro.)

new

new(name, utc_offset = nil, tzinfo = nil) Class Public methods Create a new TimeZone object with the given name and offset. The offset is the number of seconds that this time zone is offset from UTC (GMT). Seconds were chosen as the offset unit because that is the unit that Ruby uses to represent time zone offsets (see Time#utc_offset). create

find_tzinfo

find_tzinfo(name) Class Public methods