I have an Azure DocumentDB collection that I'm writing time-stamped documents to via an Event Hub triggered function. The timestamp that I'm writing to the document (my_timestamp) originates from the function that processes the event, and I've confirmed that it is accurate.
The problem that I'm encountering is that the _ts metadata timestamp that's created by DocumentDB itself is showing a unix timestamp value that's a number of seconds previous to the timestamp I'm creating, i.e., it's actually applying a timestamp that's earlier than the beginning of the function execution that creates the document...
It appears that this may be a quirk in the underlying DocumentDB mechanics.
Anyway, I wanted to see if anyone else is encountering this discrepancy. Here are the timestamps as they appear in my document:
"my_timestamp": 1499301915, // here's my timestamp that originates from the Azure Function
"_ts": 1499301899 // and here's the timestamp created by DocDB?
And the code used to derive my_timestamp in the Azure Function:
var timeStamp = + Math.floor(new Date().getTime() / 1000);

my_timestampis calculated? - Jesse Carter