Module: Moped::BSON::Extensions::Time::ClassMethods

Included in:
Time
Defined in:
lib/moped/bson/extensions/time.rb

Instance Method Summary collapse

Instance Method Details

#__bson_load__(io) ⇒ Object



15
16
17
18
# File 'lib/moped/bson/extensions/time.rb', line 15

def __bson_load__(io)
  seconds, fragment = io.read(8).unpack(INT64_PACK)[0].divmod 1000
  at(seconds, fragment * 1000).utc
end