跳至内容 跳至搜索
方法
D
I
N

类公共方法

new(timezone: nil, **kwargs)

# File activerecord/lib/active_record/type/internal/timezone.rb, line 7
def initialize(timezone: nil, **kwargs)
  super(**kwargs)
  @timezone = timezone
end

实例公共方法

default_timezone()

# File activerecord/lib/active_record/type/internal/timezone.rb, line 16
def default_timezone
  @timezone || ActiveRecord.default_timezone
end

is_utc?()

# File activerecord/lib/active_record/type/internal/timezone.rb, line 12
def is_utc?
  default_timezone == :utc
end