Module: ActiveModel::Type::Helpers::Timezone
Instance Method Summary collapse
Instance Method Details
#default_timezone ⇒ Object
13 14 15 |
# File 'activemodel/lib/active_model/type/helpers/timezone.rb', line 13 def default_timezone is_utc? ? :utc : :local end |
#is_utc? ⇒ Boolean
9 10 11 |
# File 'activemodel/lib/active_model/type/helpers/timezone.rb', line 9 def is_utc? ::Time.zone_default.nil? || ::Time.zone_default.match?("UTC") end |