Description
The "timestamp" and "increment" fields of bsoncxx::types::timestamp are being passed incorrectly to bson_append_timestamp in the core builder. As part of the work of fixing it, we should write a regression test for the bug.
This fix will need to be backported to at least 3.1.x.
Previous description:
Hi!
Is it normal that parts of timestamp i and t are confused?
bsoncxx::types::b_timestamp last;last.timestamp = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); last.increment = 0;bsoncxx::builder::stream::document filter; filter << "ts" << bsoncxx::builder::stream::open_document << "$gt" << last << bsoncxx::builder::stream::close_document;std::cout << bsoncxx::to_json(filter.view()) << std::endl; { "ts" : { "$gt" : { "$timestamp" : { "t" : 0, "i" : 1497105104 } } } }