# Inject node with wrong time !?

**URL:** <https://discourse.nodered.org/t/inject-node-with-wrong-time/90415>\
**Category:** General\
**Tags:** time, debug\
**Created:** [25 August 2024 10:39 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415 "2024-08-25T10:39:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [25 August 2024 10:39 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415/1 "2024-08-25T10:39:09Z")

</div>

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/0/703426c29b49859bf3c9958ee5023712c0f0f7e2.png)  
 ![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f02108fb5b04e1435988ac7971142955a8b89857.png)

```auto
Current default time zone: 'Europe/Berlin'
Local time is now: Sun Aug 25 12:30:10 CEST 2024.
Universal Time is now: Sun Aug 25 10:30:10 UTC 2024.

```

Why does the inject node have one hour difference?

---

<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:** [25 August 2024 11:16 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415/2 "2024-08-25T11:16:18Z")

</div>

The most likely (and often) cause is the time or timezone is different on the node-red server where node-red is running, to where your browser is running.

---

<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:** [25 August 2024 11:18 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415/3 "2024-08-25T11:18:17Z")

</div>

And if you are running in Docker, check the timezone of the container is UTC+2

---

<div class="post-metadata">

**Author:** ![Mamonetti](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Mamonetti](https://discourse.nodered.org/u/Mamonetti)\
**Post date:** [25 August 2024 12:56 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415/4 "2024-08-25T12:56:50Z")

</div>

You should consider using **node-red-contrib-cron-plus** instead of an inject node. There you can define cron-like notifications as well as set the timezone of the node. With this, your flow will be independent of the timezone configuration of the host machine (or docker/k3s/k8s, if you're using one of them).

Regards

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [25 August 2024 14:53 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415/5 "2024-08-25T14:53:35Z")

</div>

I had changed the time zone with raspi-config to Europe/Berlin, but did not restart Node-RED or the raspi itself. After a reboot of the Raspi a new test inject node started at the desired time.  
To be sure, I deleted the old inject node and created a new one with the desired time.

Thanks for your answers.

---

<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:** [8 September 2024 14:53 UTC](https://discourse.nodered.org/t/inject-node-with-wrong-time/90415/6 "2024-09-08T14:53:51Z")

</div>

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