Timeinfo

Time status sample for test

[{"id":"e4d9b4b1.fcd178","type":"function","z":"33003e0e.2382a2","name":"","func":"var d = new Date();\nvar dow = [\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"][d.getDay()];\nvar h = d.getHours() < 10 ? \"0\"+d.getHours() : d.getHours();\nvar m = d.getMinutes() < 10 ? \"0\"+d.getMinutes() : d.getMinutes();\nvar ss= d.getSeconds() < 10 ? \"0\"+d.getSeconds() : d.getSeconds();\nnode.status({fill:\"green\",shape:\"ring\",text: dow+\" \"+h+\":\"+m+\":\"+ss});\nreturn msg;\n","outputs":1,"noerr":0,"x":370,"y":200,"wires":[[]]},{"id":"fd99fd6e.15a71","type":"inject","z":"33003e0e.2382a2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":180,"y":160,"wires":[["e4d9b4b1.fcd178"]]}]
suparit

Flow Info

created 2 months, 2 weeks ago

Node Types

Core
  • function (x1)
  • inject (x1)

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option