Confused about different timestamps start, stop and time

Hi there,

Just started to work with Influxdb 2.0 in combination with node.js.
Written data from node to influxdb by means of the influxdb node client.

I would like to understand the following and I have not been able to find anything in documentation.
So after writing a point to the database where I set the time value on the point that I write to the DB I see a result that I would not expect.

In the data explorer there are 3 time stamps. start, stop and time. The “stop” timestamp has the value provided on the data point written via the node.js client. The other are defaulted to 1970 etc.

Are there alway three timestamps on each data point by default?

If so I don’t understand why time on the db side was not set to the value provided in the code (.timestamp) on the node.js side.

Thanks for your help to increase my level of understanding.

Hello @pbird,
Yes, there are always three timestamps. The _start and _stop timestamps are the timestamps that corresponds with the range() portion of your query (they’re used for windowing for example). The _time represents the timestamp of the individual point.
These docs might be useful to you:
https://v2.docs.influxdata.com/v2.0/query-data/get-started/#group-keys

Thanks for your response.

Did some further digging by writing data via the line protocol via the command line. The results are different and make more sense in combi with your input.
When writing data from the console start is 1970 date, stop: timestamp of write and time equal to the value provided. Which makes sense.

The node.js lib has a different behavior which threw me off. The timestamp field on the Point class is written to the Stop timestamp. Start en time are both default to 1970 date.

1 Like