Solved / Wrong timezone in Node Red / Correct time in Hass & in docker container

The work around did not work for me, my container is set to EET same as my Hassio setup, however node-red is still using UTC, except for in the debug window.

Me too. TZ is correct on portainer’s container enviroment, but nodered still uses UTC. Did anyone manage to solve it?

image

Hi,

i have the same issue here. Ist there any solution? If not, I maybe would add a bug notification to the plugin.

Attached a Foto of a timestamp inject going directly to a debug node. Timestamp of debug node is correct, timestamp of the timestamp inject is not.

Bildschirmfoto 2021-01-28 um 08.02.14

… ok, the time zone in Home Assistant itself was set to Paris, not Berlin. I’m sorry for the confusion.

I had the issue and solved it according to the documentation of the Node-RED Add-on:

Time zone configuration

The addon will use the configured time zone of the underlying operating system. If this is incorrect (for example with the Home Assistant Operating System it will be UTC), this can be configured in the /config/node-red/settings.js file.

To do so, open the file with a text editor and add the following above the module.exports = { line.

process.env.TZ = "America/Toronto";

The time zone will need to reflect your environment.

Save the file and restart the Node-RED add-on.

Worked well.

3 Likes

Thanks, I have this issue also right now so i googled it and found this thread.

Question: I am running HA OS, and the text you quote say the OS is running in UTC. Is this “by design”, or can i maybe just change the OS timezone to reflect my timezone?

Where can I find the settings.js file in home assistant?

It’s outside of the file editors reach now. It’s one level up where the /media folder is. There is another folder labeled addon_configs. In there you’ll find a node red folder.