InfluxDB not returning results when group by time offset at a summer/winter time change
1
vote
0
answers
145
views
Let's start with an example. I've got an application that logs a point every minute. When I aggregate this data into a query where I'll have the count of logs per day, I get the following result. Keep in mind, that the query and the data is in UTC.
SELECT count(int_3)
FROM data
WHERE time >= '2023-10-26T00:00:00Z'
AND time = '2023-10-26T00:00:00+02:00'
AND time The offset_interval is a duration literal. It shifts forward or back the InfluxDB database’s preset time boundaries. The offset_interval can be positive or negative.
For example let's use the first query (UTC) again and shift the start time and endtime one hour back.
SELECT count(int_3)
FROM data
WHERE time >= '2023-10-25T23:00:00Z'
AND time = '2023-10-25T23:00:00Z'
AND time = '2023-10-25T23:00:00+02:00'
AND time < '2023-10-31T22:59:59+01:00'
GROUP BY time(1d,23h) fill(none)
TZ('Europe/Amsterdam')
2023-10-25T23:00:00+02:00 1260
2023-10-26T23:00:00+02:00 1440
2023-10-27T23:00:00+02:00 1440
2023-10-28T23:00:00+02:00 1440
2023-10-29T23:00:00+01:00 1320
2023-10-30T23:00:00+01:00 1440
```
And there is the problem. 2023-10-29
should have one hour of point (60 points) more than the other days, but actually got 2 hours (120 points) less, which I find difficult to explain.
Does somebody have an explanation or a solution for this?
I'm using InfluxDB v1.8.10 and v1.11.1.
Asked by Ron Nabuurs
(121 rep)
Jan 19, 2024, 12:34 PM
Last activity: Jan 24, 2024, 07:48 AM
Last activity: Jan 24, 2024, 07:48 AM