module BSON::Time::ClassMethods

def from_bson(buffer, **options)

Other tags:
    Since: - 2.0.0

Other tags:
    See: http://bsonspec.org/#/specification -

Returns:
  • (Time) - The decoded UTC datetime.

Options Hash: (**options)
  • :mode (nil | :bson) -- Decoding mode to use.

Parameters:
  • buffer (ByteBuffer) -- The byte buffer.
def from_bson(buffer, **options)
  seconds, fragment = Int64.from_bson(buffer, mode: nil).divmod(1000)
  at(seconds, fragment * 1000).utc
end