I have an unusual issue that probably has a simple solution that I have been unable to figure out so far…
I’m running Home Assistant using Docker on Ubuntu 18.04 (not HASS.io, just the Home Assistant container). In a separate container, I’m running Node-RED which connects just fine to Home Assistant.
My issue is the Node-RED container displays the incorrect local time of UTC instead of UTC - 5. I’ve tried many things including setting the container’s environment variable to local time, mapping \etc\localtime and \etc\timezone volumes, etc…
This is the only container out of 12 services that have this issue. When I remote into the container and run date, it clearly shows UTC instead of UTC-5.
I’m having the same issue too with node_red. I tried the volume mount and variable. I still got the time messed up. I even deleted the container and the image files.
Good catch - I corrected the TZ environment variable, removed the volume mappings, and then restarted the container - still no luck.
I’ve also tried each combination of environment + volume mapping with container restarts each time and the output of node-red container still shows UTC.
Wait - how are you checking the current time in Node Red? If you are going by the output of the “inject” node’s timestamp - that’s always in unix time, and when you click it in the debug window, it’s converted to UTC always as far as I know.
If you install something like BigTimer, it will use your computer’s local time.
I’ve found that this works to have Node-Red show local time when looking at the last triggered time in Node-Red. Obviously, use your timezone instead of Brussels.