Hi, that's strange, if I inject a string with spaces they are correctly displayed, if I use a function it doesn't show the space, please consider this flow:
[{"id":"d906ef38.9de2c","type":"ui_text","z":"cc2c1666.3d904","group":"cad2b1e9.412298","order":2,"width":0,"height":0,"name":"time","label":"","format":"{{msg.payload}}","layout":"row-center","x":1310,"y":1720,"wires":[]},{"id":"c1e98346.64745","type":"inject","z":"cc2c1666.3d904","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"","payloadType":"date","x":790,"y":1720,"wires":[["fbc6f385.caca38"]]},{"id":"fbc6f385.caca38","type":"simpletime","z":"cc2c1666.3d904","name":"Clock","mydate":true,"myymd":false,"myyear":false,"mymonth":false,"mymonthn":false,"mydom":false,"mydoy":false,"myday":false,"myhourpm":false,"myhour":true,"mytime":false,"mytimes":false,"myminute":true,"myminutes":false,"mysecond":true,"mymillis":false,"myepoch":false,"myrawdate":false,"mypm":false,"x":970,"y":1720,"wires":[["c37b259d.90424"]]},{"id":"c37b259d.90424","type":"function","z":"cc2c1666.3d904","name":"","func":"if (msg.mysecond%2==1) {duepunti=\":\";} else {duepunti=\" \";}\nmsg1={payload:msg.mydate};\nmsg2={payload:msg.myhour+\" \"+duepunti+\" \"+msg.myminute};\nreturn [msg1,msg2];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1150,"y":1720,"wires":[["a5b8ae14.0e046"],["d906ef38.9de2c"]]},{"id":"a5b8ae14.0e046","type":"ui_text","z":"cc2c1666.3d904","group":"cad2b1e9.412298","order":1,"width":0,"height":0,"name":"date","label":"","format":"{{msg.payload}}","layout":"row-center","x":1310,"y":1680,"wires":[]},{"id":"cad2b1e9.412298","type":"ui_group","name":"6Colonna","tab":"ef482f31.2d1628","order":6,"disp":false,"width":"6","collapse":false},{"id":"ef482f31.2d1628","type":"ui_tab","name":"Franco","icon":"dashboard","disabled":false,"hidden":true}]