class TZInfo::Timestamp

def initialize!(value, sub_second = 0, utc_offset = nil)

Experimental RBS support (using type sampling data from the type_fusion project).

def initialize!: (Integer value, ?(Rational | Integer) sub_second, ?(Symbol | Integer | nil) utc_offset) -> Integer?

This signature was generated using 77 samples from 4 applications.

Parameters:
  • utc_offset (Object) -- either `nil` for a {Timestamp} without a
  • sub_second (Numeric) -- the fractional part of the second as either a
  • value (Integer) -- the number of seconds since 1970-01-01 00:00:00 UTC
def initialize!(value, sub_second = 0, utc_offset = nil)
  @value = value
  # Convert Rational(0,1) to 0.
  @sub_second = sub_second == 0 ? 0 : sub_second
  if utc_offset
    @utc = utc_offset == :utc
    @utc_offset = @utc ? 0 : utc_offset
  else
    @utc = @utc_offset = nil
  end
end