# Some nodes have UTC time while other show local time

**URL:** <https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241>\
**Category:** Dashboard\
**Created:** [15 April 2024 06:15 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241 "2024-04-15T06:15:22Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [15 April 2024 06:15 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/1 "2024-04-15T06:15:22Z")

</div>

Node Red ist installed in Proxmox CT on an Computer. Time in Proxmox is correct.  
In Node Red the time in the head section is correct, as well as in all charts, in nodes like "moon-position" and "sun-position", where I can correct the time with the "Date/Time Formatter".  
But it is not correct in nodes like "within time", "eztimer" and in all nodes where date and times are showed. Some have also the UK fomat (AM/PM) instead of local format (de\_AT).

I have a node "inject enhanced" - "Date/Time Formatter" which sow the correct time.  
From KNX I get the correct time

How can I fix the problem to have in Node Red in all nodes the local time in the local fomat de\_AT?

See here a screenshot - you can see the GMT instead of local time:  
 ![screen nr](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1cea53245ee6474fde7a287cde793059933e7aa4.png)

Further tests show that the time in node "simpletime" is also wrong.

---

<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:** [15 April 2024 08:38 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/2 "2024-04-15T08:38:40Z")

</div>

Can you export and paste here a very simple flow just using node-red core nodes (not any additional installed nodes) that shows the problem please?

---

<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:** [15 April 2024 08:42 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/3 "2024-04-15T08:42:07Z")

</div>

Also please import this flow (which runs the date command on the server) and show us what it gives.

```auto
[{"id":"6f45f31d3e2ac573","type":"inject","z":"bdd7be38.d3b55","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":200,"y":2980,"wires":[["8885abbf31128f7a"]]},{"id":"8885abbf31128f7a","type":"exec","z":"bdd7be38.d3b55","command":"date","addpay":"","append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"get date/time","x":400,"y":2980,"wires":[["41a3ac49602f5a59"],["fa8b5e1a2cfdc919"],["7953ed5251425f93"]]},{"id":"41a3ac49602f5a59","type":"debug","z":"bdd7be38.d3b55","name":"o/p 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":700,"y":2920,"wires":[]},{"id":"fa8b5e1a2cfdc919","type":"debug","z":"bdd7be38.d3b55","name":"o/p 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":2980,"wires":[]},{"id":"7953ed5251425f93","type":"debug","z":"bdd7be38.d3b55","name":"o/p 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":690,"y":3040,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [15 April 2024 09:26 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/4 "2024-04-15T09:26:28Z")

</div>

first debug shows Mon Apr 15 09:24:44 UTC 2024  
second debug shows nothing  
third debug shows {code:0}

local time now ist 11:24

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [15 April 2024 12:39 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/5 "2024-04-15T12:39:33Z")

</div>

![wrongtime](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/3/93a16b5a79c7ffc7dd478b77609ba25a7ff633f4.png)

but correct time now 14:38!

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [15 April 2024 13:20 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/6 "2024-04-15T13:20:24Z")

</div>

If you click on that debug message value, it will cycle through different representations of the timestamp.

Hopefully one of the formats will look something like `15/04/2024, 14:38:00 [UTC+2]`

The Z indicates Zulu Time (= UTC = GMT)

---

<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:** [15 April 2024 14:52 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/7 "2024-04-15T14:52:45Z")

</div>

> [@Nilpferd](#):
>
> first debug shows Mon Apr 15 09:24:44 UTC 2024

That is the result of running `date` on the node-red server, which means that node red is running in an environment where the time zone is UTC. If you are certain that the time zone on the Proxmox is not UTC then is node red running in a Docker container? If so then the time zone of the container itself is set to UTC.

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [16 April 2024 07:32 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/8 "2024-04-16T07:32:43Z")

</div>

I changed the timezone in Nodered CT:

 ![timezone](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/2/029cfa4684723c8d5b0a023b0aca85c562dd4cd2.png)  
hopefully you can read it when you click on it

But this didnot change anything.  
So I try to check Proxmox once more.

In the othercase I move NR back to a Raspi4 or 5 with M2 disk.

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [16 April 2024 07:49 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/9 "2024-04-16T07:49:18Z")

</div>

![timepx](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/66bf75190d0302815c764fdb1da4191c22657f6c.png)

proxmox timezone is also correct.

---

<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:** [16 April 2024 08:40 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/10 "2024-04-16T08:40:22Z")

</div>

What is the date flow I posted showing now?

---

<div class="post-metadata">

**Author:** ![Nilpferd](https://avatars.discourse-cdn.com/v4/letter/n/db5fbb/32.png) [@Nilpferd](https://discourse.nodered.org/u/Nilpferd)\
**Post date:** [16 April 2024 09:42 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/11 "2024-04-16T09:42:12Z")

</div>

Sorry I cant give you any reply on this matter anymore. Proxmox server is down already. Thanks for your help. Nodered is now again running on the old system (Raspi3) and will stay for a certain while until I have time to start with a new improved system.

---

<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:** [16 May 2024 09:42 UTC](https://discourse.nodered.org/t/some-nodes-have-utc-time-while-other-show-local-time/87241/12 "2024-05-16T09:42:35Z")

</div>

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