Problem when using grafana with timezone UTC+2h

Hi

Informations : Grafana preference & Dashboard parameter “timezone” is UTC .

So my problem is :

the time is 08h30 Am in France (UTC+2h) when I fix timerange last 3h ,graphics show value 05h30am to 08h20 (value/time are egal of in my datasource Influxdb (datasource’s times are in “french” time ).

In query inspector I can see that : stop = 06h35 am !! (logically 08h35) and the graph result is :

After ,if i modify directly the range in order to have the value in last 10 minutes) ,the graphic and query show that :
The hour is wrong on graphic

So I can’t see the last 2 hours directly and with good time in graphics if my origin time(france) not in UTC timezone.
The other problem that if I want put alert on my graphic ,the email will be sending 2 hours later !.

I think when the parameter timezone of dashboard is “UTC+2h” (for example) ,the timerange start/stop must be recalculate for query .

Thanks by advance for your answer and I wish you can fix this (my) problem .

Ps: I’m French ,so sorry for my English :wink:

Hi @frenchy76! I’m not really sure what you mean by the above. Influx timestamps are always UTC. That’s what the “Z” at the end means. There’s no option for inserting/storing data in influx in a different time zone. So if that’s what you’re trying to do, I think that’s the root of the problem.

Hi @svetb
the “Z” is the query generated by grafana .(inspector->query) .

i want to explain that i want to have graphic with the last minute of value with good time scale .(it’s not the case on the screenshoot)

In my example ,at 08h35 am (gmt+2) ,i can see the true value if ,only, i selected 10h35 am in “Absolute time range” of dashboard.

best regards

Please can you confirm whether the timestamps in your data source are UTC or
CEST?

Antony.

hi @pooh
i think the timestamps is CEST because when i execute query with influxQl and use for time the last hour (ex: 08h30am in france) of the day (select last… where time >= ‘2021-05-13T08:20:00’) ,the result value/timestamps is correct .

that i think is : "if i set parameter timezone “browser time” (for me utc+2h) the query generated by grafana don’t be as i describe " !? no?

thanks for your help

Antoine

I think the timestamps [in the data source] is CEST.

That will be your problem then. Grafana data store timestamps must be in UTC,
if for no other reason than to avoid duplicate timestamps when the clocks go
back in autumn.

because when i execute query with influxQl and use for time the last hour
(ex: 08h30am in france) of the day (select last… where time >=
‘2021-05-13T08:20:00’) ,the result value/timestamps is correct

You may say “correct” but you mean “local”. That is not “correct” for
Grafana.

You must use UTC (or have some way to convert your local timezone back to UTC
before Grafana sees it) for the timestamps in your data store, otherwise you
will experience offsets of the type you describe.

Antony.

2 Likes

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