instance method
zone
Ruby on Rails 7.1.6
Since v2.2.3Signature
zone()
Returns the time zone abbreviation.
Time.zone = 'Eastern Time (US & Canada)' # => "Eastern Time (US & Canada)" Time.zone.now.zone # => "EST"
Source
# File activesupport/lib/active_support/time_with_zone.rb, line 133
def zone
period.abbreviation
end
Defined in activesupport/lib/active_support/time_with_zone.rb line 133
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::TimeWithZone