The toUTCString() method converts a Date object to a string, according to universal time.
The toUTCString() method converts a Date object to a string, according to universal time.
UTC time is the same as GMT time.
Date.toUTCString()
A String, representing the UTC date and time as a string
Convert a Date object to a string, according to universal time:
//display the UTC date and time as a string. var d = new Date(); var n = d.toUTCString(); console.log(n);//ww w .j a va2 s.c o m