Db with timestamps in local time (UTC+1) filters data with one hour offset

  • What Grafana version and what operating system are you using?
    9.2.3

  • What are you trying to achieve?
    Using a database with timestamps having time in local timezone UTC+1. When selecting “last 6 hours” then the first hour does not contain data.

  • How are you trying to achieve it?
    Simply by selecting the time column which includes the local timestamps. the query also has a filter on “WHERE $__timeFilter(time)” in order to speed things up, the db has 2 mio records.

  • What happened?
    first hour missing in the display of the graphs

  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    no

  • Did you follow any online instructions? If so, what is the URL?
    no.

Have created a work arround that, using
WHERE time BETWEEN DATE_SUB(FROM_UNIXTIME(${__from:date:seconds}), INTERVAL 1 HOUR) AND DATE_SUB(FROM_UNIXTIME(${__to:date:seconds}), INTERVAL 1 HOUR)
as filter in the query. But that looks complicated, was hoping to fix the issue with some timezone settings in grafana, but did not find the correct setting.
I see that iobroker-db seems to store timestamp in UTC0, that seems to work fine. Unfortunately the db in this case has timestamp stored as local time which is UTC+1

Any better idea as the workarround i found?

what type of db server is it?

It is on Raspberry Mariadb (=MySQL).