I’m displaying energy usage stored in InfluxDB. I want to have a bar graph, that displays how much energy was used per day. I already have a graph which uses SELECT derivative (24h)
and GROUP BY time (24h)
to display a single measurement per 24-hour timeframe.
However, the point in time from when this is calculated is inconvenient. For example, the timecode for the latest bar in the bar graph is 2017-10-23 02:00:00. The day always “rolls over” at 00:00 UTC, it seems (I’m in Germany and we have summertime, so the UTC offset is +2).
So, my question is: How do I change the exact point in time where the GRPOUP BY time(24h)
starts grouping? I obviously want it to be 12 midnight and not 2 AM.
Currently my query looks like this:
SELECT derivative(mean("DataRecord_0_Value"), 24h) / 1000 FROM "MBusData_mbus" WHERE ("SlaveInformation_Id" = '6054930') AND $timeFilter GROUP BY time(24h)