Using "moment" node. Not quite there

The MOMENT node is supposed to help with date/time formatting.

I am wanting to Human readable timestamp a message and write it to a file with other data.

This is the flow, and it nearly gets the right time:
Local date/time is (now) 2018 08 01 16:56
The output of the flow is the right date but the time is 06:56 (Not with the GMT offset.)
But the node has the settings set to the correct local time zone.

[{"id":"5ab558bd.ac87d","type":"inject","z":"afeeae02.67742","name":"","topic":"","payload":"Blah","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":280,"y":920,"wires":[["b6f9f2fe.7849c8"]]},{"id":"b6f9f2fe.7849c8","type":"function","z":"afeeae02.67742","name":"","func":"msg.payload = {\n    date:Date.now()\n}\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":920,"wires":[["e637e76.55b0518","754974cf.7b9d9c"]]},{"id":"e637e76.55b0518","type":"moment","z":"afeeae02.67742","name":"","topic":"","input":"date","inputType":"msg","inTz":"Australia/Sydney","adjAmount":0,"adjType":"days","adjDir":"add","format":"","locale":"en_AU","output":"payload","outputType":"msg","outTz":"Australia/Sydney","x":590,"y":920,"wires":[["a42a2937.c49d1"]]},{"id":"a42a2937.c49d1","type":"debug","z":"afeeae02.67742","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":770,"y":920,"wires":[]}]

I had the same with setup at locale while on a normal console if I check "date" is ok.... just correct it with the adjustment in my case:

image

Just a note in case is usefull for you....

you can reformat the output at your wish as example:

image

Will return you as output example: mar. 02 ene. 02:34:47
More option check for linux command date on google or "man date" on a console.

Regards

1 Like

Weirdly once I set the ddd DD MMM (etc) the time became correct.

All happy now.

Appreciated.