Time Zone Problem for MSSQL Queries

Hi all,

I’m facing time zone problem for MSSQL Queries. My Browser Time equals to query records. I could manage graph time display (adding to queries -3 HOURS) but i had to use $__timefilter macro. Thus, queries time and graph time display different time info.
I set Local Browser Time as TimeZone.

Thanks in advance,
Serdar

Golden rule: always use UTC timezone for your DB records.

1 Like

Then, data shifted on the graph :slight_smile: How can i manage graph time?

DB data in timezone 1 + Grafana instance in the timezone 2 + user browser (dashboard timezone) in the timezone 3 + standard vs daylight time = total time zone chaos.

Do you think that DB data in timezone 1 + user browser (dashboard timezone) in the timezone 1 is a good combination? Nope, because Grafana uses UTC and not browser timezone in the query.

DB data in UTC + Grafana in UTC time zone => data returned from the Grafana datasource backend are in UTC timezone (check result in the query inspector) and then only Grafana frontend in the browser applies selected dashboard timezone.

1 Like