How can I convert a date to GMT?

Matt Johnson-Pint‘s answer is much better than this one was.

console.log(new Date("Fri Jan 20 2012 11:51:36 GMT-0500").toUTCString())

Leave a Comment