Chart Time Scale Wrong

My chart shows the time value off by -4 hours.
I have a few buttons that a I can click. Each button sends a pre-built SQL statement to my server. The results is an array of values being DateTime and a Number.
When I run the query in SQL, I get the correct results.
When I put a debug node in just before the chart, I see the correct values.
But as stated, the chart shows the time value 4 hours behind the actual values.

Hi,

I'd guess timezone (UTC) is creating this offset.

Cheers,

Paul

Paul, I was thinking the same thing.
I am totally new to this, however, the raw data is being recorded at the correct value and the server hosting the page is the correct time zone.
So is the chart just deciding to display all data in the wrong time zone?

Hi,

What is the timezone of the machine that is running Node-RED?

I've used the 'moment' node previously to correct time offsets before - works well.

Also - google is your friend - Timezone settings?

Cheers,

Paul

What format are you providing the timestamps in? Feed the data into a debug node and show us what you are seeing.
Hopefully you are storing UTC time in the database and I would expect the chart to expect UTC. It will convert it to local time for display.
Check that both the node-red server and the browser are using the correct timezone.

Your data shows a Z at the end of the timestamp which indiacates that they are in UTC.

If this is wrong you will need to change the time stamps to show your local time instead

I missed the fact that you had shown some data already. Sorry. To amplify @ukmoose's reply, the data in the debug shows values around 10:33 UTC. If that is not correct, but that is the data stored in the db, then the problem is in the logic that writes the data to the DB, not at the extraction/display end.