Node-red v0.20.5
node.js v10.15.3
macOS 10.13.6
I just ran into a strange issue using debugs to display the date.
The flow is an inject
connected to a function
connected to two debug
nodes - one displaying the complete msg object the other displaying msg.payload. The function is
msg.payload = new Date();
return msg;
Here is the flow and the debugs:
Notice the different way the date is being displayed. Shouldn't it show the same way??
[{"id":"73856941.30394","type":"debug","z":"425023c2.794014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":830,"y":120,"wires":[]},{"id":"6fb74403.88b574","type":"function","z":"425023c2.794014","name":"Get date","func":"msg.payload = new Date();\nreturn msg;","outputs":1,"noerr":0,"x":620,"y":160,"wires":[["73856941.30394","3d5e32b1.27160e"]]},{"id":"a19ee0cf.193c58","type":"inject","z":"425023c2.794014","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":460,"y":160,"wires":[["6fb74403.88b574"]]},{"id":"3d5e32b1.27160e","type":"debug","z":"425023c2.794014","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":810,"y":240,"wires":[]}]