Module: BSON::Time::ClassMethods
- Defined in:
- lib/bson/time.rb
Overview
Instance Method Summary collapse
-
#from_bson(bson) ⇒ Time
Deserialize UTC datetime from BSON.
Instance Method Details
#from_bson(bson) ⇒ Time
Deserialize UTC datetime from BSON.
55 56 57 58 |
# File 'lib/bson/time.rb', line 55 def from_bson(bson) seconds, fragment = Int64.from_bson(bson).divmod(1000) at(seconds, fragment * 1000).utc end |