Node Red Docker wrong time

I’m using Node Red in Doker but I noticed that in Node Red the current time of my zone is off by -2 hours which is why I have problems with the timer nodes.
I wanted to know if this could depend on ihost?
in ihost or
the current time is correct as set.

Can you provide screenshots of timer nodes?

Check this video. Did not watch the entire thing, but it talks about setting your timezone in the settings.js file which you can access with the file browser extension on the iHost.

with time and hard-headedness I understood that the problem lies in node red, the only way to solve the problem is to access the settings.js of node red and change the time zone zone.
in the first installation I did not create a specific volume for Node Red and now with the iHost file browser I have difficulty managing the setting.js file to adjust the time.
I’m trying to figure out if I can now create volume for node red and other add-ons.

I can’t watch the video you showed me, I managed to access the setting.js of node red in ihost but I can’t find the time zone value…maybe I have to create it myself but I don’t know how to do it, can you help me thanks.

Did Sonoff forum just removed the video link. Let me post again:

The video was referring to this discussion: Inject node runs at wrong time · Issue #845 · node-red/node-red · GitHub

And it looks like you need to add a line like this into your settings.js:
process.env.TZ = "America/Chicago";
Make sure it is added outside the module.exports section.

1 Like

I tried to put it manually
process.env.TZ = “Italy/Rome”;
outside module.exports = {…
but nothing has changed, it asks for an environment variable to insert this command but I don’t know how to do it for the moment I’ll try to study.
however I solved it with the BigTimer node which has the possibility of inserting UTC +2 time in Italy, my country, I hope that the iHost developer team can implement the automatic UTC time from the host.

I had the same problem, I’m just using node-red-contrib-cron-plus.
It allows you to define the time zone,

Just remember to back-up your Node-Red. Just yesterday mine died and I lost all my flows because I forgot to back them up. There is an export/import option if you open the thing on the top right.

Greetings to everyone, I take up the disagreement about the wrong time in Node-Red:
I had the problem of pairing my ihost with Alexa via matter, I couldn’t do this, a developer asked me to check the system registry and here I noticed that despite having set UTC + 1 Rome “my country ITALY” the time reported in the system log file is 1 hour later than the real time in my area.
I wanted to ask if this is a system bug and could be the cause of the wrong time in Node-Red.