class method
self.new
Ruby on Rails 5.1.7
Signature
self.new(name, utc_offset = nil, tzinfo = nil)
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).
Parameters
-
namereq -
utc_offsetopt = nil -
tzinfoopt = nil
Source
# File activesupport/lib/active_support/values/time_zone.rb, line 287
def initialize(name, utc_offset = nil, tzinfo = nil)
@name = name
@utc_offset = utc_offset
@tzinfo = tzinfo || TimeZone.find_tzinfo(name)
end
Defined in activesupport/lib/active_support/values/time_zone.rb line 287
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeZone