APIdock / Ruby on Rails
/
Browse About
method

zone

v6.0.0 - Show latest stable - Class: ActiveSupport::TimeWithZone
zone()
public

Returns the time zone abbreviation.

Time.zone = 'Eastern Time (US & Canada)'   # => "Eastern Time (US & Canada)"
Time.zone.now.zone # => "EST"
# File activesupport/lib/active_support/time_with_zone.rb, line 134
    def zone
      period.zone_identifier.to_s
    end

Related methods

  • Instance methods
  • +
  • -
  • <=>
  • acts_like_time?
  • advance
  • ago
  • as_json
  • between?
  • blank?
  • change
  • comparable_time
  • dst?
  • encode_with
  • eql?
  • formatted_offset
  • freeze
  • future?
  • getgm
  • getlocal
  • getutc
  • gmt?
  • gmt_offset
  • gmtime
  • gmtoff
  • hash
  • httpdate
  • in
  • in_time_zone
  • init_with
  • inspect
  • is_a?
  • isdst
  • iso8601
  • kind_of?
  • localtime
  • marshal_dump
  • marshal_load
  • method_missing
  • past?
  • period
  • respond_to?
  • respond_to_missing?
  • rfc2822
  • rfc3339
  • rfc822
  • since
  • strftime
  • time
  • to_a
  • to_datetime
  • to_f
  • to_formatted_s
  • to_i
  • to_r
  • to_s
  • to_time
  • today?
  • tv_sec
  • utc
  • utc?
  • utc_offset
  • xmlschema
  • zone
  • Class methods
  • name
  • new
  • Private methods
  • privateduration_of_variable_length?
  • privateget_period_and_ensure_valid_local_time
  • privatetransfer_time_values_to_utc_constructor
  • privatewrap_with_time_zone
APIdock API Documentation Browser

© 2026 APIdock