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



7
8
9
10
# File 'lib/moped/bson/extensions/time.rb', line 7

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