diff --git a/packages/node_modules/@node-red/nodes/core/function/89-trigger.js b/packages/node_modules/@node-red/nodes/core/function/89-trigger.js index 7b5b820b7..910043d33 100644 --- a/packages/node_modules/@node-red/nodes/core/function/89-trigger.js +++ b/packages/node_modules/@node-red/nodes/core/function/89-trigger.js @@ -179,7 +179,10 @@ module.exports = function(RED) { /* istanbul ignore else */ if (node.op1type !== "nul") { var msg2 = RED.util.cloneMessage(msg); - node.topics[topic].tout = setInterval(function() { node.send(RED.util.cloneMessage(msg2)); }, delayDuration); + node.topics[topic].tout = setInterval(function() { + if (node.op1type === "date") { msg2.payload = Date.now(); } + node.send(RED.util.cloneMessage(msg2)); + }, delayDuration); } } else { @@ -209,6 +212,7 @@ module.exports = function(RED) { } else { msg2.payload = node.topics[topic].m2; + if (node.op2type === "date") { msg2.payload = Date.now(); } if (node.second === true) { node.send([null,msg2]); } else { node.send(msg2); } }