Methods

Class Public methods

new(timezone: nil, **kwargs)

📝 Source code
# File activerecord/lib/active_record/type/internal/timezone.rb, line 7
        def initialize(timezone: nil, **kwargs)
          super(**kwargs)
          @timezone = timezone
        end
🔎 See on GitHub

Instance Public methods

default_timezone()

📝 Source code
# File activerecord/lib/active_record/type/internal/timezone.rb, line 16
        def default_timezone
          @timezone || ActiveRecord.default_timezone
        end
🔎 See on GitHub

is_utc?()

📝 Source code
# File activerecord/lib/active_record/type/internal/timezone.rb, line 12
        def is_utc?
          default_timezone == :utc
        end
🔎 See on GitHub