For moment.utc, the date will be parsed and displayed in local time. By default, date will be shown in local time. In case you need to parse it in UTC, you can make use of this method.
moment.utc can take params as number, string, moment, date etc. This method can be used when the date displayed has to be in UTC format.
var date1 = moment.utc();
Any moment created with moment.utc() will be in UTC mode, and any moment created with moment() will be not.
The following example shows the hours fetched from local and utc moment −
var a = moment().hours(); var b = moment.utc().hours();
Observe an additional example showing the display of date in utc and local mode −
var a = moment().format(); var b = moment.utc().format();