Well, just because people are still posting here......
I have found (yet) another way which is nearly as easy as the J: $now()
This:
[{"id":"8dcf66c9.6bdd68","type":"function","z":"baf80d2f.6bd538","name":"Time stamp","func":"msg.time = new Date().toLocaleString();\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":3850,"wires":[["d6ba8a8.e508878"]]}]
This is great.
2 lines.
And I see easy to read date/time.
And just so everyone is on the same page:
This is for debugging stuff.
It is so an event happens, it passes this node to time stamp it, it is put in to a queue and then a debug node.
The queue node also has inputs to step through the data which I do to see when things happen.
Agreed. If it is just for debugging, that is more than adequate.
I'm seeing some behavior here that seems... well, not helpful. Say I have 3 debug messages showing the same createDate
field (with js internal timestamp value). When I click on the first one it switches from timestamp to zulu time. Then, when I click on the second field, it switches from timestamp to hexadecimal (not zulu?). Finally I click on the 3rd value, and it doesn't change at all (since the next format in the cycle is internal timestamp).
So clearly there is only one variable holding the next toggle mode, not one for each individual value (which is understandable), or for each property name (i.e. "createDate").
I can understand why changing all the formats in the sidebar whenever I click on one of them would probably not be helpful, but could it toggle all fields with the same name? Alternately, is there a setting that will change the default format that is displayed (i.e. always show zulu time first)?