I have one hour difference between local time and the one I get
I have set timezone to Europe/Oslo
I have also added line
process.env.TZ = "Europe/Oslo";
into settings.js file
I see that RaspberryPi shows correct time. I use node-red to receive message from mqtt server. Message only contains temp and humidity values, no time in message payload. I then show temp and humidity with time on a dashboard and can see that time is always by 1 hour different.
That is the correct time, the Z means that it is the time in UTC. If you lookup the JavaScript date functions you will find methods that will give you a string to display it in the local timezone.
However dashboard still shows value with Z at the end and with one hour diff.
How this can be when same msg.payload is used for both. How can I get correct time on my dashboard?
As I said before those are both correct.15:51 UTC is the same time as 16:51 GMT+1. What you are asking is how to display that time in one format rather than the other.
One way to do that would be to feed it into a node-red-contrib-moment node to generate the particular format you want.