Flowdock
method

get_zone

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ActiveSupport::CoreExtensions::Time::Zones::ClassMethods

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

get_zone(time_zone) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activesupport/lib/active_support/core_ext/time/zones.rb, line 55
            def get_zone(time_zone)
              return time_zone if time_zone.nil? || time_zone.is_a?(TimeZone)
              # lookup timezone based on identifier (unless we've been passed a TZInfo::Timezone)
              unless time_zone.respond_to?(:period_for_local)
                time_zone = TimeZone[time_zone] || TZInfo::Timezone.get(time_zone) rescue nil
              end
              # Return if a TimeZone instance, or wrap in a TimeZone instance if a TZInfo::Timezone
              if time_zone
                time_zone.is_a?(TimeZone) ? time_zone : TimeZone.create(time_zone.name, nil, time_zone)
              end
            end
Register or log in to add new notes.