Data in the DB: in UTC timezone
Grafana DB user: UTC timezone (e.g. session time zone - I guess this is your problem - it returns +2 and then Grafana UI will add it as well +2)
Grafana UI: “moves” received UTC data to browser/dashboard/panel timezone
For your simplicity: set everything on the server side to UTC.
But i must say this isn’t practical at all when having to add much data…seen this issue is been present since 2021 and yet can’t be fixed?¿
Having to either set server to UTC or use CONVERT_TZ doesn’t seem normal to me.
That’s not solution. It’s only a workaround. Are you going to edit all your queries when CEST will change to CET and vice versa? That will happen in a few days, so prepare for another problem. Strictly use UTC and let client only (e.g. Grafana) to handle local timezones.
there are tons of time zones on planet earth (not sure about other planets, never been there) instead of trying to account for every single type of time zone, a good tool would design things to use one common time zone: UTC.
That’s exactly my point, no one uses UTC only. As my (and everyone else) server and db handle automatically cet/cest, why can’t grafana simply read that data as indicated in configuration of time series → Axis ->Time zone and just display it correctly based on settings of the Browser time settings picker?
No, nobody shows it in UTC, but everyone saves it in UTC.
Why no Prometheus user has a problem with timezone? Because Prometheus always keep data in UTC timezone by design. Poor designated SQL DBs have this problem usually. You keep in your poor DB that we will meet at 2024-10-10 09:00:00, so you will send me invitation with time 2024-10-10 09:00:00. And I guarantee that we don’t meet, because we are in different timezone, so we have time “2024-10-10 09:00:00” at different time points.
Yes, you can use local timezone, but it will be more complicated (e.g. PostgreSQL has timestamptz, so also timezone is saved - I can save in local timezone, but then I can query easily in UTC), so for your simplicity use UTC.
Grafana has proper timezone handling, but save and query in yhe UTC timezone. Yes, complain that’s wrong, but then think how can you solve problem with Daylight saving time - are you aware that different countries may have different time when they change DST, you can expect that some countries may refuse to use DST in the future at all.
So saves and query data in the Grafana in the UTC (visualize it in whatever timezone you want then in the UI) or suffer in the timezone hell forever.