Problem with Query UTC =0, apply -2h

Hello,

I would like to display data but grafana apply -2h on my query, I don’t understand what parameters I have to set to get the correct time and get no modification from grafana between what I store and what I display

I set UTC to +0 on dashboard and profil of grafana instead of +2 UTC but nothing change, in the query details I see that it stop 2h before the real ‘now’

I did take a look to this topic : Problem when using grafana with timezone UTC+2h - #6 by pooh
But I don’t understand the solution, what I have to do ?

utc 0

My Sql timestamp are correct

your STATE_START column needs to be in UTC or converted to UTC using a function.

What data source is it? mysql, postgres, mssql?

1 Like

Hello,
This is a PostgreSQL database, I made the query SELECT now() and it was at UTC+0 so I try to set to Europe/Paris in postgresql.conf…

after restart of database, the query Select now() give me the right time

NOW() returns timestamp WITH TIME ZONE, but your tables has WITHOUT TIME ZONE:
image

I’m happy to meet you with you today and help you with your problem on 2024-07-01 15:00:00 (please note it’s WITHOUT TIME ZONE :-P). I guarantee that we won’t meet, because this is not enough.
My “2024-07-01 15:00:00” is in different time 2024-07-01 14:00:00+00 (I’m BST time zone),
then yours “2024-07-01 15:00:00” - 2024-07-01 15:00:00+00 (I guess you are CEST time zone).

So use time WITH TIME ZONE in your table.

Ok my now() on postgresql is good, on grafana it shows value correctly , and on nodered I insert date as utc+0 and it is working properly

Thanks for your help :+1: