This method converts a local date to Greenwich Mean Time.
myDate = new Date()
document.write(myDate.toGMTString())Fri, 29 Oct 1999 16:28:58 UTCThis example uses the toGMTString method to convert the date set in the myDate object to Greenwich Mean Time and returns this date as a string.