Right now I am using:
var today=nesw Date(); var date = today.getUTCFullYear()+'-'(rotday.getUTCMonth()+1)+'-'+today.getUTCDate()+'T'+today.getUTCHours()+':'+today.getUTCMinutes()+':'+today.getUTCSeconds()+'.'+today.getUTCMilliseconds(); msg.payload=date return msg;
The problem is that the date is sometimes outputted as
12:2:5.54 and I NEED
12:02:05.54 . As seen, in UTC.