Date.toUTCString()
Converts a Date object to a string, according to universal time
var event = new Date('14 Jun 2017 00:00:00 PDT');
console.log(event.toUTCString());
// expected output: Wed, 14 Jun 2017 07:00:00 GMT
Syntax
dateObj.toUTCString()Description
Examples
Using toUTCString()
toUTCString()var today = new Date('Wed, 14 Jun 2017 00:00:00 PDT');
var UTCstring = today.toUTCString(); // Wed, 14 Jun 2017 07:00:00 GMTReferences
Contributors to this page
Last updated