Monthly aggregation not working as expected

Hi,
I’m trying to get monthly aggregations from values I record about every second. Unfortunately I’m struggling to get the query working correctly.
I tried:

from(bucket: "mybucket")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "mymeasurement")
  |> filter(fn: (r) => r["_field"] == "myvalue")
  |> aggregateWindow(every: 1mo, fn: min)

I expected to get a result table with one entry for every month and a value from the beginning of the month (as I use the min function and the value is constantly growing as it is a meter reading).
Infact I get the following (shortened to the relevant columns):

_time	                _value
2021-11-01T00:00:00Z	1361045.9416 # (that's a value from the end of September/beginning of oktober --> one month wrong)
2021-12-01T00:00:00Z	1431051.4897 # (that's a value from the end of October/beginning of November -> again one month wrong)
2022-01-01T00:00:00Z	1651448.4397 # (same here...)
2022-01-01T22:59:59Z	1935557.5113

All _time values are wrong by one month. Why does this happen?

Thanks

Hello @chris_b,
What did you select for your start and stop times?

Hi @Anaisdg ,
sorry for my late reply, I missed the email notification.
On the Influx webfrontend I selected e.g. a range from 01.11.2021 00:00:00 to 01.01.2022 00:00:00 → always whole months. For some reason the “_time” value is always one month to late compared to the expected result.

Would it help if I share some “real” data for the investigation? If so, how can I export the data in a helpful way?