Since:
2.0.0
Deserialize UTC datetime from BSON.
Parameters:
The byte buffer.
a customizable set of options
Options Hash (**options):
Decoding mode to use.
Returns:
The decoded UTC datetime.
See Also:
116 117 118 119
# File 'lib/bson/time.rb', line 116 def from_bson(buffer, **options) seconds, fragment = Int64.from_bson(buffer, mode: nil).divmod(1000) at(seconds, fragment * 1000).utc end