Hi everyone, I’m running Grafana v7.3.7 (1e261642f4) and I’ve run into a frustrating issue regarding time data.
I am working on a project dealing with one MySQL database table which contains a few columns containing time data, all using the
datetime data type. All entries into the time data columns are drawn from an external file, in UTC time zone format.
I am using only one of these columns in all my queries, titled
time_end. Here is an example of one of my queries, which displays a bar graph at hourly intervals:
SELECT $__timeGroupAlias(time_end,'1h',0), count(*) as value, 'Incoming' as metric FROM $log_table WHERE $__timeFilter(time_end) AND direction = 'IN' GROUP BY 1 ORDER BY $__timeGroup(time_end,'1h')
The query is being refreshed each minute, and the data being entered into the database is also being updated each minute. Therefor, the most recent data should be from approximately 12:00pm PST, according to my local browser time, as Grafana is set to Local Browser Time, UTC-8:00.
However, instead, this results in the following graph:
Which, as you can see, shows the most recent entry as 20:00, 8 hours into the future. For some reason, Grafana is not interpreting the UTC time codes within the MySQL database and converting them to PST.
I can provide any additional details if required, any help is appreciated!