When using the table panel, the timestamps are about 8 hours earlier than what they should be. When looking in the database, the timestamps are correct, but for some reason the table panel decides to subtract 8 hours away from the correct time (year, month, day, min, and sec are all correct). How would I go about fixing this? When I change the time zone to UTC it fixes the timestamps in the table but then the timestamps in all of my graphs are off.
When you say the timestamps are correct are you storing them in UTC? You should be. Grafana will then correct for the local timezone.
When I switch the timezone to UTC the table timestamps are correct, yes. However, switching to UTC causes the timestamps shown for the graph to be wrong.
First check that the timezones of the server and client are correct (and database server if that is a different machine). The correct situation is to have UTC timestamps in the db, otherwise at DST switchover you will either have a gap or overlapping values.
Having checked the timezones what are the queries used for each panel, and what does the query inspector show?
Sorry, I am a little unsure to what you mean. I’m using MySQL and MAMP and the timestamps are correct there. I’m not sure how to check if those are in UTC? Why does changing to UTC on Grafana make one panel correct and make another panel wrong? Thank you for responding
I don’t know how to do that with mysql, I don’t use that much. You will have to research that yourself.
Are you running the browser on the same machine running Grafana? If not is it possible to do that.
When you said you switched the timezone to UTC which exactly did you do. If you mean the timezone of the machine running the browser was changed then the chart should show the UTC timestamps. So if you select something like Last 3 hours then the most recent data should still be at the right hand side of the chart but the scale should show the current time in UTC at the right hand side. If the chart is working correctly like that then it probably isn’t the timestamps in the database.
What query are you using for the table? Compare it with the one being used for the chart.