Trigger timestamp output


is it by intention that the trigger node when configured to send a timestamp when it is triggered and also when the time is over, the time is the same? Since the trigger can be reset, this does not make much sense, does it?


I agree it does seem a little strange that the timestamp sent in the second message is the same as that of the first, one might expect it to be the current time in each case.

@knolleary @dceejay do you think this is a bug or a feature?

yes - the incoming message is just cloned and then resent... so yes is a little odd - It is probably is a bug - but needs thinking about. Would anyone be relying on the existing behaviour ?

It seems unlikely, but impossible to know, unless it happens to be someone here. Difficult to know what is for the best.

I agree with Colin, "unlikely" but you never know!?!?

There are a few possible workarounds that come to mind...

  • major version update & replace the timestamp with
  • An backwards compatible additional option [x] Send current time ?
  • An a additional .now timestamp in the msg?
  • Leave it as is and have folk use a change/function node afterwards?

any favourites / other ideas?

  • It's a core node so a major bump would have to wait for Node-RED v2 :slight_smile:
  • having two options that say timestamp would look daft...
  • possible but again uugh
  • possible - but...

I think I'm falling on the side of "it's a bug" as the intention was for it to be the latest timestamp (especially if you set it to be a repeating (first) output.

1 Like

That depends on whether one considers it a bug. If it is a bug then there is no need for a major version upgrade. Personally I would class it as a bug, and the OP here apparently expected the logical behaviour, not as it is at the moment. I suspect no-one has ever used the node in this way so it has not been noticed.

fell free to raise an issue so we can track it properly. Thanks

I was just off to add an issue, but I see @brainbugfix has beaten me to it.

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