Grafana does not show first 2 hours from thingspeek

Hello i hawing problems to get data from thingspeek, it always shows blank in first 2 hours

How to fix it?

Welcome to forum @aigarsinserts

Is the date data coming from thingspeek UTC?

1 Like

the date looks like this

im using${__from:date:YYYY-MM-DD}%20${__from:date:HH}:${__from:date:mm}:${__from:date:ss}&end=${__to:date:YYYY-MM-DD}%20${__to:date:HH}:${__to:date:mm}:${__to:date:ss} to get custom timeframe data

Try to set dashboard timezone to UTC

If you mean this , than it is did nothing.

What’s your browser timezone? UTC+/-2?

I did use -2, +2 and utc it did not change at all.

It is +2

So you still have not answered if the time coming from that api is utc.

So which plugin are you using to fetch the data?

You can use jsonata to convert that date time to utc

Im not sure data comes from esp8266 then it goes to thingspeek and only then to grafana my local time is +2 utc, in thingspeek it is working fine. Only in grafana first 2 hours are missing

Im using “yesoreyeram-infinity-datasource”

Im already cheeasing the time by using "${__from:date:YYYY-MM-DD}%20${__from:date:HH}:${__from:date:mm}:${__from:date:ss}&end=${__to:date:YYYY-MM-DD}%20${__to:date:HH}:${__to:date:mm}:${__to:date:ss}" it is used to tell thingspeek what timeframe to use

I bet ${__to:date:YYYY-MM-DD}%20${__to:date:HH}:${__to:date:mm}:${__to:date:ss} formats in your browser local time zone.
So just change your browser (computer) timezone to UTC and it should be fine.

1 Like

See if this doc helps which explain the time range problem with thingspeak.

1 Like

Having the same problem.
I’m at UTC+01 :00
Querying Thingspeaks give also the ‘created_at’ with +1 ( when removing the format in Grafana), example : Fri Mar 15 2024 08:56:30 GMT+0100 (Central European Standard Time)
I’m missing the 1 (left) hour when using ‘3 hour’ interval (but I receive data from the query)
I’m receiving ‘no data’ when using ‘1 hour’ or ‘Last 5 min’ interval.
(It’s no option for me to change the PC Windows time to UTC )
Tried JSON and CSV with the same result/problem.
Also using ${__to:date:YYYY-MM-DD}%20${__to:date:HH}:${__to:date:mm}:${__to:date:ss} in the query.

Searched and read already a lot of related community pages but still didn’t find the solution.


I found solution, i hope you will check it and tell if it works for you.
you need to add ?timezone=Europe%2FRiga before start, here is for differed timezones Time Zones Reference - MATLAB & Simulink - MathWorks Switzerland
or if you use “ofset” (feeds.json?ofset?start=$) works just fine

My boy ye did it, we fixed grafana.

Please Someone send my apology letter to admin



1 Like