In lib/mongo/grid/file/info.rb there is the following code:
def default_document BSON::Document.new( :_id => BSON::ObjectId.new, :chunkSize => Chunk::DEFAULT_SIZE, # MongoDB stores times with millisecond precision :uploadDate => Time.now.utc.round(3), :contentType => DEFAULT_CONTENT_TYPE ) end
The round(3) call needs to be replaced by the rounding we perform elsewhere which rounds down instead of rounding to nearest and handles jruby rounding the negative times in the wrong direction.
- is related to
-
RUBY-2145 bson 4.8.0 rounds Time during serialization to bson/extended json
- Closed