Hello, I’m facing an issue. I’m collecting data from a controller and visualizing it with Grafana. The controller sends data to MySQL in UTC, the server itself is set to UTC+1, and I’m accessing Grafana from a UTC+2 time zone. Grafana is generating the query
SELECT
timestamp AS time,
Flow_Concentrate,
Flow_Permeate
FROM asedlt_8622.plc_data
WHERE timestamp BETWEEN FROM_UNIXTIME(1744030193) AND FROM_UNIXTIME(1744030493)
I checked the dates I’m receiving on my server, and they are in UTC, so I’m converting the time accordingly.
FROM_UNIXTIME(1744030193)
2025-04-07 15:49:53
FROM_UNIXTIME(1744030493)
2025-04-07 15:54:53
I got data from 2025-04-07 15:49:53 to 2025-04-07 15:54:53. I don’t have such data in the database because it’s 3 hours behind.
If it’s possible, do you have a way to make Grafana generate the query like this?
SELECT
timestamp AS time,
Flow_Concentrate,
Flow_Permeate
FROM asedlt_8622.plc_data
WHERE timestamp BETWEEN FROM_UNIXTIME(1744030193-**3600*3**)
AND FROM_UNIXTIME(1744030493-**3600*3**)
Are there any other ways to reduce the query time? How does Grafana handle UTC time with $__timeFilter
?