module ActiveRecord::Type::Internal::Timezone
Public class methods
Source code GitHub
# File activerecord/lib/active_record/type/internal/timezone.rb, line 7
def initialize(timezone: nil, **kwargs)
super(**kwargs)
@timezone = timezone
end
Public instance methods
Source code GitHub
# File activerecord/lib/active_record/type/internal/timezone.rb, line 16
def default_timezone
@timezone || ActiveRecord.default_timezone
end
Source code GitHub
# File activerecord/lib/active_record/type/internal/timezone.rb, line 12
def is_utc?
default_timezone == :utc
end