# Inconsistant timezone in node-red

**URL:** <https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386>\
**Category:** General\
**Tags:** node-red-dashboard, chart\
**Created:** [2 April 2025 20:57 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386 "2025-04-02T20:57:56Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigbean17](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bigbean17/32/89814_2.png) [@bigbean17](https://discourse.nodered.org/u/bigbean17)\
**Post date:** [2 April 2025 20:57 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386/1 "2025-04-02T20:57:57Z")

</div>

Hi,  
I'm trying to set the timezone in my node-red to Australia/Perth.

The node-red is running on Ubuntu 22.04, the system timezone was set to Australia/Perth. This is the output of `date` command.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/02837deb6284ddb05ad92aa50eaf27a925dc53be.png)

However, in node-red, the timezone is Australia/Sydney.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bf148d691fe7be3907efea441f7b4bab48359b16.png)

I also tried to add `process.env.TZ=Australia/Perth` but still no luck. I restart my node-red everytime I change the settings.js and system time.

The wrong timezone makes the x-axis of my line chart incorrect, the x-aixs is also showing Sydney time instead Perth. Any help would be appreciated!

Thanks!

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [2 April 2025 21:14 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386/2 "2025-04-02T21:14:51Z")

</div>

How are you running node-red (docker container?)

What do you see if you use an exec node to run the `date` command?

If you press `ctrl-shift-p` and enter "system info", what does it reveal?

---

<div class="post-metadata">

**Author:** ![bigbean17](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bigbean17/32/89814_2.png) [@bigbean17](https://discourse.nodered.org/u/bigbean17)\
**Post date:** [2 April 2025 21:33 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386/3 "2025-04-02T21:33:00Z")

</div>

@Steve-Mcl

> How are you running node-red (docker container?)

- I'm not using docker, I'm using systemd on ubuntu 22.04, I have my own systemd file (node-red-ps.service).

> What do you see if you use an exec node to run the `date` command?

- The exec command gives the correct output  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f4e4a35ef8b68a086004c560ccce734c7aa4b24d.png)

> If you press `ctrl-shift-p` and enter "system info", what does it reveal?

- Everything looks correct in system info  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/5/358ac2f41ea895112b6a2657771099609c5bf509.png)

[UPDATE]

- Reboot server does not help
- Changing timestamp node to Json Date object prints the correct time (and timezone), seems like only node-red itself uses incorrect timezone  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/6/761b2e0cafb0ad89536c9a9f36787c12b8cf3aea.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:** [3 April 2025 06:46 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386/4 "2025-04-03T06:46:48Z")

</div>

> [@bigbean17](#):
>
> However, in node-red, the timezone is Australia/Sydney.  
> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bf148d691fe7be3907efea441f7b4bab48359b16.png)

Where is the value shown coming from?

Can you try a different browser?

---

<div class="post-metadata">

**Author:** ![bigbean17](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bigbean17/32/89814_2.png) [@bigbean17](https://discourse.nodered.org/u/bigbean17)\
**Post date:** [3 April 2025 23:18 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386/5 "2025-04-03T23:18:40Z")

</div>

Hi,

> Where is the value shown coming from?

This came from an timestamp inject node.

> Can you try a different browser?

I just realize that setting up `process.env.TZ works`, the timezone printed in the node-red console and the axis of charts use the browser timezone.

Thank you all for helping

---

<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:** [2 July 2025 23:18 UTC](https://discourse.nodered.org/t/inconsistant-timezone-in-node-red/96386/6 "2025-07-02T23:18:52Z")

</div>

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