Strange inject behaviour giving wrong time

In terminal on my PI4 "date" shows correct time.
In nodered if I inject to a debug and parse the epoch it is also the correct time (UTC+1)
If I set a specific time in the inject node it outputs an hour late.
I have recently converted to Docker but am reasonably confident that all the environment stuff is OK.

It is the time zone inside the container that matters (because that is like a VM with its own timezone independent of the host)

Search the forum or WWW, this has been asked and answered a few times e.g:
https://discourse.nodered.org/search?q=%23docker%20timezone

To check the time zone inside the docker container, use an exec node to run the command date and see what it gives.

Note that debug node output can be confusing as it displays using the timezone of the browser.

Thank you both, I get it now. I has set the docker environment variable "TZ=UK" which is wrong and it presumably resorts to UTC. Anyway now sorted.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.