# Timezone setting for Node Red on Home Assistant OS

**URL:** <https://discourse.nodered.org/t/timezone-setting-for-node-red-on-home-assistant-os/55923>\
**Category:** General\
**Tags:** home-assistant\
**Created:** [31 December 2021 09:51 UTC](https://discourse.nodered.org/t/timezone-setting-for-node-red-on-home-assistant-os/55923 "2021-12-31T09:51:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thanhtam23](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thanhtam23/32/53343_2.png) [@thanhtam23](https://discourse.nodered.org/u/thanhtam23)\
**Post date:** [31 December 2021 09:51 UTC](https://discourse.nodered.org/t/timezone-setting-for-node-red-on-home-assistant-os/55923/1 "2021-12-31T09:51:16Z")

</div>

Hi,  
I'm new to Node Red but found it's very helpful to setup my home automation flow.  
I have setup time range to turn on my light during night time only but somehow the return timing look incorrect.  
My other steps are showing with correct trigger local timing so I'm sure my server timezone is correct.  
Is there anyway to setup Node Red with correct local timezone? My timezone is GMT+8 by the way.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/2/d281849fafec445fc7c1b3d30b12dd74aed19bd9.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [31 December 2021 11:11 UTC](https://discourse.nodered.org/t/timezone-setting-for-node-red-on-home-assistant-os/55923/2 "2021-12-31T11:11:29Z")

</div>

I believe that HA uses a Docker image for node red. It sounds as if the timezone for the Docker node red container is not correct. How to do that is, I think, an HA question. Few, if any, here use HA, preferring to use node-red for everything. so you might be better asking on an HA forum.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [31 December 2021 13:38 UTC](https://discourse.nodered.org/t/timezone-setting-for-node-red-on-home-assistant-os/55923/3 "2021-12-31T13:38:32Z")

</div>

You need to inject the correct `TZ` environment variable

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 March 2022 13:38 UTC](https://discourse.nodered.org/t/timezone-setting-for-node-red-on-home-assistant-os/55923/4 "2022-03-01T13:38:54Z")

</div>

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