Fetch Current Time zone through a variable

Hello,

I am trying to fetch some rows through a MySQL Database which has all the timestamps as UTC.
The dashboard can be viewed across different timezones. (India/US/Seoul) etc.

I’m using the convert_tz function from MySQL (MySQL CONVERT_TZ() function - w3resource) to convert UTC Timestamps to the local ones but it requires the local time zone offset to be supplied in the query.

Example :
SELECT CONVERT_TZ(‘2008-05-15 12:00:00’,’+00:00’,’+9:00’);

Where +9:00 is the Seoul Time zone.

Does Grafana supports any variables which could dynamically generate the time zone offset value (’+5:30’, ‘+9:00’) etc. or are there any workarounds for the same?

Many Thanks

This topic was automatically closed after 365 days. New replies are no longer allowed.