Mega Code Archive

 
Categories / JavaScript Tutorial / Date
 

Date toUTCString()

The toUTCString() method returns a string representing the universal time of the Date object. The date is converted to the GMT time zone before being converted to a string. This method is exactly the same as the toGMTString(). <html>     <script language="JavaScript">     <!--     theDate = new Date();     document.write(theDate.toUTCString());     -->     </script>     </html>