Line Protocol Timestamp seems off 1 hour?


First time on the community with a question. During experimenting, where everything worked smooth and fine, I just recently noticed something.

I’m having an issue with the use of the Line Protocol that I am trying to solve.

Running v2.7.6 on a local linux machine.
Tried the REST WS and the Line Protocol “Enter Manually” option.

profiles,name=GGV,commodity=GAS azi=0.00016932528 1577836800
profiles,name=GGV,commodity=GAS azi=0.00020000000 1577840400

Deliberately using the timestamp from the influxDB docs site.

It should correspond with 2020-01-01T00:00:00Z UTC datetime.

But when I’m querying it seems to have stored it under
_time timestamp 2020-01-01T01:00:00:00Z.

Might there be something I’ve missed or doing wrong here?
Maybe a server setting of any kind?

Thanks in advance,



I believe I’ve got the answer to this. I think I’ve seen this issue explained before a while back on this forum.

While writing my data with a regular interval every hour it depends on how you query this interval.

|> aggregateWindow(every: 1h, fn: mean, createEmpty: false)

Maybe someone can confirm but I can understand that an aggregate of 2 timestamps will write the result into the second timestamp. I just did not expect it would also happen when my interval is already 1 hour.

Does anyone know what would be the correct way to resolve this?
Either I remove the aggregateWindow or I expand my aggregateWindow with a additional paramter.

timeSrc: "_start"

This addition seems to write the value at the first timestamp though I am not sure what this option does exactly.

Does anyone have a suggestion?



By default, aggregateWindow() uses the _stop column (the stop time of each window) to get the new timestamp for the aggregated point.

I.e. mean value from 10:00 to 11:00 would have 11:00 timestamp.

Setting timeSrc to _start you change this behaviour and get 10:00 for an example above.

Without using aggregation at all you are viewing raw data that should be the same as in your line protocol.

Hi ebabeshko,

Thanks for the response.

And yes, this definitely confirms my findings. Now I can continu from here.