I’ve made it work by making the ‘timestamp’ field a js Date instead of a number.
Note that in the code snippet below, the variable ‘timestamp’ is a dayjs-generated unix timestamp without milliseconds, whereas the js Date ctor needs milliseconds, hence the * 1000, and ‘model’ is the model for the relevant timeseries collection.
I have tried putting in a unix timestamp with and without milliseconds, both resulted in the same error.
const event: Event = {
timestamp: new Date(timestamp * 1000),
// other fields,
};
model.create(event);
Is there a piece of documentation that I missed, that says the timeField should be a js Date?