toUTCString()
displays the complete UTC date
according to universal time.
UTC time is the same as GMT time.
toUTCString() |
Yes | Yes | Yes | Yes | Yes |
dateObject.toUTCString();
None.
A string representing the UTC date and time as a string.
var aDate = new Date(Date.UTC(2021, 5, 4, 12, 21, 55));
console.log(aDate.toUTCString());
The code above generates the following result.