I’m based ina UTC+2 timezone and i’m using this query to grab data from my MySQL db:
SELECT
UNIX_TIMESTAMP(TS) AS "time",
P_Plus*$wandlerfaktor AS "Wirkenergie",
Q4*$wandlerfaktor AS "Blindarbeit Q.IV"
FROM $meterID
WHERE
$__timeFilter(TS)
ORDER BY TS
this works find and there is no timeshift. But on another graph, i want to group the values by every 7 days and the query looks like this:
SELECT
$__timeGroupAlias(TS,1d),
sum(P_Plus*$wandlerfaktor/4) AS "Wirkarbeit"
FROM $meterID
GROUP BY 1
ORDER BY $__timeGroup(TS,1d)
Now there is a 2h Timeoffset. I can’t use UNIX_TIMESTAMP(TS) in that querys because then my grouping wont work. Is there a way to get my values without a timeshift AND grouped?
Thanks