rmongodb
rmongodb copied to clipboard
missing milliseconds in timestamp while querying with mongo.find.all
When I switch from working with mongo cursors (mongo.find) to fetching data frames (mongo.find.all) I get a data frame with POSIXct
timestamps and those timestamps don't have milliseconds.
E.x:
res = mongo.find.all(...)
tsval = as.numeric(res$timestamp[1])
print(tsval, digits=20)
# prints 1429294389
cursor = mongo.find(...)
tsval = as.numeric(mongo.bson.value(mongo.cursor.value(cursor), 'timestamp'))
print(tsval, digits=20)
# prints 1429294389.1229999
Expected behaviour: Should receive the same result with milliseconds in both cases - 1429294389.1229999