create

create(name, utc_offset = nil, tzinfo = nil) Class Public methods Alias for: new

all

all() Class Public methods Returns an array of all TimeZone objects. There are multiple TimeZone objects per time zone, in many cases, to make it easier for users to find their own time zone.

[]

[](arg) Class Public methods Locate a specific time zone object. If the argument is a string, it is interpreted to mean the name of the timezone to locate. If it is a numeric value it is either the hour offset, or the second offset, of the timezone to find. (The first one with that offset will be returned.) Returns nil if no such time zone is known to the system.

zone

zone() Instance Public methods Time uses zone to display the time zone abbreviation, so we're duck-typing it.

xmlschema

xmlschema(fraction_digits = 0) Instance Public methods Also aliased as: iso8601

utc_offset

utc_offset() Instance Public methods Returns the offset from current time to UTC time in seconds. gmt_offset gmtoff

utc?

utc?() Instance Public methods Returns true if the current time zone is set to UTC. Time.zone = 'UTC' # => 'UTC' Time.zone.now.utc? # => true Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' Time.zone.now.utc? # => false gmt?

utc

utc() Instance Public methods Returns a Time or DateTime instance that represents the time in UTC. comparable_time getgm getutc gmtime

tv_sec

tv_sec() Instance Public methods Alias for: to_i

today?

today?() Instance Public methods Returns true if the current object's time falls within the current day.