Grafana mess with my datatimestamp field

Running Grafana v8.5.3 locally installed on a raspi 4. Running MySQL database. I have a column in the database that is datatime format yyyy-mm-dd hh:mm:ss.ssssss. In a table display of this data in Granfana, Granfana changes the hh part of the timestamp. It’s changed the time by exactly 5 hours?, It’s like adding 5 hours to my datatime field before its displayed. I"m just trying to dump the data from the table. No conversion or anything.

What is going on?
I’ve added 2 images to this post and also I’m new to Grafana. :slight_smile: !

Joe


Welcome

What time zone are your dates in your sql server? Assuming they are not UTC…?

To the best of my understanding, your correct, datetime is not stored as UTC, where as Timestamp is. I"m using datetime Time zone is set to Americas, Chicago which is Central Daylight Savings Time.

MySQL doc states
In short, “ MySQL converts TIMESTAMP values from the current time zone to UTC for storage, and back from UTC to the current time zone for retrieval. (This does not occur for other types such as DATETIME .)”

In other words, timezone information is lost in DATETIME columns. This may not be a huge problem if your use cases regarding timezone are homogeneous.

So is Grafana doing some type of conversion thinking it’s UTC format?

Thw following thread has helped me

https://localhost:3000/t/microsoft-sql-server-utc-to-localtimezone/6965

1 Like

Thank you, that worked for me. I’m off learning more about Grafana

2 Likes

Always document your journey. Happy learning!!