module Moped::BSON::Extensions::Time::ClassMethods

Public Instance Methods

__bson_load__(io) click to toggle source
# 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