foo:PRIMARY> db.createCollection("coll", {timeseries: {timeField: 'time'}})
{
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1691419064, 2),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1691419064, 2)
}
foo:PRIMARY> db.runCommand({insert: "coll", documents: [{x: 0, time: ISODate()}, {x: 1}], ordered: true})
{
"n" : 2,
"electionId" : ObjectId("7fffffff0000000000000004"),
"opTime" : {
"ts" : Timestamp(1691419106, 1),
"t" : NumberLong(4)
},
"writeErrors" : [
{
"index" : 1,
"code" : 2,
"errmsg" : "'time' must be present and contain a valid BSON UTC datetime value"
}
],
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1691419106, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1691419106, 1)
}
foo:PRIMARY> db.runCommand({insert: "coll", documents: [{x: 0, time: ISODate()}, {x: 1}], ordered: false})
{
"n" : 1,
"electionId" : ObjectId("7fffffff0000000000000004"),
"opTime" : {
"ts" : Timestamp(1691419125, 1),
"t" : NumberLong(4)
},
"writeErrors" : [
{
"index" : 1,
"code" : 2,
"errmsg" : "'time' must be present and contain a valid BSON UTC datetime value"
}
],
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1691419125, 1),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1691419125, 1)
}