class method
self.new
Ruby on Rails 4.1.16
Since v2.2.3Signature
self.new(name)
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.)
Parameters
-
namereq -
utc_offsetopt = nil -
tzinfoopt = nil
Source
# File activesupport/lib/active_support/values/time_zone.rb, line 372
def new(name)
self[name]
end
Defined in activesupport/lib/active_support/values/time_zone.rb line 372
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeZone