Module: ActiveModel::Type::Helpers::Timezone
Instance Method Summary collapse
Instance Method Details
#default_timezone ⇒ Object
17 18 19 |
# File 'lib/active_model/type/helpers/timezone.rb', line 17 def default_timezone is_utc? ? :utc : :local end |
#is_utc? ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'lib/active_model/type/helpers/timezone.rb', line 9 def is_utc? if default = ::Time.zone_default default.name == "UTC" else true end end |