Answers for "utc timestamp from moment"

0

convert utc time to local time moment

const date = moment.utc().format();
console.log(date, "- now in UTC");
const local = moment.utc(date).local().format();
console.log(local, "- UTC now to local");
Posted by: Guest on December-23-2020
2

moment get timestamp

moment().unix() // you will get a unix timestamp

moment().valueOf() // you will get a full timestamp
Posted by: Guest on April-07-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language