Module: ActiveRecord::Type::Internal::Timezone
Instance Method Summary collapse
Instance Method Details
#default_timezone ⇒ Object
16 17 18 |
# File 'lib/active_record/type/internal/timezone.rb', line 16 def default_timezone @timezone || ActiveRecord.default_timezone end |
#initialize(timezone: nil, **kwargs) ⇒ Object
7 8 9 10 |
# File 'lib/active_record/type/internal/timezone.rb', line 7 def initialize(timezone: nil, **kwargs) super(**kwargs) @timezone = timezone end |
#is_utc? ⇒ Boolean
12 13 14 |
# File 'lib/active_record/type/internal/timezone.rb', line 12 def is_utc? default_timezone == :utc end |