// Create date object from datetime string
var date = new Date('Tue, 21 Apr 2020 09:20:30 GMT');
// Coverting to local datetime
// Coverting local datetime back to UTC
console.log(date.toUTCString()); // Tue, 21 Apr 2020 09:20:30 GMT
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.