jnunemaker/mongomapper — pull request #442 by leifcr (2012-08-16 08:40:02+00:00)
Title: Fixes Time objects to have same time on save as when getting the object

Rounds all times to three digits, so time is same as saved in DB when set. This makes comparing times easier.

Before patch: (using mmconsole)
```ruby
class Thing
include MongoMapper::Document
key :date, Time
end

thing = Thing.new
thing.date = Time.now
thing.date.to_f
# => 1345106294.1552615
thing.save
thing.reload
thing.date.to_f
# => 1345106294.155
# Not equal before/after save
```

After patch:
```ruby
class Thing
include MongoMapper::Document
key :date, Time
end

thing = Thing.new
thing.date = Time.now
thing.date.nsec
# => 921000000
thing.date.to_f
# => 1345105899.921
thing.save
thing.reload
thing.date.to_f
# => 1345105899.921
#equal before/after save
```