# Trigger Node Output Bug or PEBKAC?

**URL:** <https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335>\
**Category:** General\
**Created:** [12 October 2024 03:55 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335 "2024-10-12T03:55:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DiverRich](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/diverrich/32/64523_2.png) [@DiverRich](https://discourse.nodered.org/u/DiverRich)\
**Post date:** [12 October 2024 03:55 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/1 "2024-10-12T03:55:13Z")

</div>

I know I must be missing something simple, but can someone explain to me why these two trigger nodes have different payloads when they both are being asked to send milliseconds since epoch? The only difference is one starts with send nothing, waits two seconds, and then send the timestamp. The other starts with sending the timestamp, waits two seconds and then sends nothing. One seems to send a legit timestamp, the other is just sending "1". Have they always been like this? I only noticed when one of my flows broke after updating to 4.0.4 and it is still behaving this way on 4.0.5.

 ![Screenshot 2024-10-11 at 8.49.29 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/9/897ae0c1b7506491a7f1420f2b2365ece932276f.png)

![Screenshot 2024-10-11 at 8.57.34 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/e/ce2e1d3e1bfddb6296f0cacca527f137123604e1.png)

```auto
[{"id":"de7b0ee8ecb2e5ee","type":"group","z":"7a970dd2f2d67388","g":"c53c02df7128bdb5","style":{"stroke":"#2b2b2b","stroke-opacity":"1","fill":"#181818","fill-opacity":"0.5","label":true,"label-position":"nw","color":"#cccccc"},"nodes":["36e5f0ca2a0f5cfc","9a9a4e8234f9f6f2","11068274249f5b33","4250ea710b0d6ffb","d24269b36bf9e864"],"x":1874,"y":2939,"w":492,"h":162},{"id":"36e5f0ca2a0f5cfc","type":"inject","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":1935,"y":3020,"wires":[["9a9a4e8234f9f6f2","4250ea710b0d6ffb"]],"l":false},{"id":"9a9a4e8234f9f6f2","type":"trigger","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"2 Seconds","op1":"","op2":"","op1type":"date","op2type":"nul","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2070,"y":2980,"wires":[["11068274249f5b33"]]},{"id":"11068274249f5b33","type":"debug","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"debug 2822","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":2250,"y":2980,"wires":[]},{"id":"4250ea710b0d6ffb","type":"trigger","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"2 Seconds","op1":"state.mostCurrentGlobalStatusChangeTime.timestamp","op2":"","op1type":"global","op2type":"nul","duration":"2","extend":false,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":2070,"y":3060,"wires":[["d24269b36bf9e864"]]},{"id":"d24269b36bf9e864","type":"debug","z":"7a970dd2f2d67388","g":"de7b0ee8ecb2e5ee","name":"debug 2823","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":2250,"y":3060,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [12 October 2024 06:59 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/2 "2024-10-12T06:59:57Z")

</div>

Looks like a bug, same result in 4.0.3. Can you report it here [Issues · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues)

[edit] Picked wrong bookmark sorry. Corrected repo to main

---

<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:** [12 October 2024 07:21 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/3 "2024-10-12T07:21:45Z")

</div>

Trigger node is a core node @E1cid (so its in the main node-red repo) - issue should be created here: [Issues · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues)

---

<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:** [12 October 2024 07:47 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/4 "2024-10-12T07:47:42Z")

</div>

Issue raised: [Core Trigger Node does not send epoch · Issue #4914 · node-red/node-red · GitHub](https://github.com/node-red/node-red/issues/4914)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [12 October 2024 16:29 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/5 "2024-10-12T16:29:39Z")

</div>

Initial fix PR here - [Fix trigger node date handling for latest time type input by dceejay · Pull Request #4915 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/4915)

---

<div class="post-metadata">

**Author:** ![DiverRich](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/diverrich/32/64523_2.png) [@DiverRich](https://discourse.nodered.org/u/DiverRich)\
**Post date:** [12 October 2024 23:20 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/6 "2024-10-12T23:20:22Z")

</div>

> [@dceejay](#):
>
> [Fix trigger node date handling for latest time type input by dceejay · Pull Request #4915 · node-red/node-red · GitHub](https://github.com/node-red/node-red/pull/4915)

Thanks for jumping on that fix so quickly and validating that the problem wasn't just me. lol

---

<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:** [26 October 2024 23:20 UTC](https://discourse.nodered.org/t/trigger-node-output-bug-or-pebkac/92335/7 "2024-10-26T23:20:52Z")

</div>

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