To get JavaScript Date in UTC with Moment.js, we use the date getTime
method.
For instance, we write
const t = new Date().getTime();
to create a new date with the current date and time with the Date
constructor.
Then we call getTime
to return its timestamp in milliseconds.