Inconsistant timezone in node-red

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

However, in node-red, the timezone is Australia/Sydney.
image

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!

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?

@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?

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

[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

Where is the value shown coming from?

Can you try a different browser?

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