how to convert date.now to utc time in javascript code example
Example 1: javascript date to utc format
new Date().toISOString()
> '2012-11-04T14:51:06.157Z'
Example 2: convert utc to date javascript
var UTCdate = new Date('4/29/2021 3:22:46 PM UTC');
var onlyDate = UTCdate.getDate();
console.log(onlyDate); //Gives 29
//Please don't forget to upvote if this answer helped you ! Have a nice day !!