This method formats a string to the ISO8601 standard. It gives the timestamp in UTC form.
moment().toISOString(); moment().toISOString(keepOffset);
var a = moment().toISOString();
To avoid the display in UTC form use true in toISOString(true) as shown
var a = moment().toISOString(true);