Sha256: 6cf54cc43a3c9804a8ab7cf049a611ef4e38169204baf2d2bb5267ceb59d83b6

Contents?: true

Size: 256 Bytes

Versions: 1

Compression:

Stored size: 256 Bytes

Contents

class DateTime
  # @api public
  def self.to_mongo(value)
    utc = value.new_offset(0)
    ::Time.utc(utc.year, utc.month, utc.day, utc.hour, utc.min, utc.sec)
  end

  # @api public
  def self.from_mongo(value)
    value.to_datetime
  end
end # DateTime

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dm-mongo-adapter-0.6.0 lib/mongo_adapter/support/date_time.rb