how to convert a date to utc in javascript time code example Example: javascript date to utc format new Date().toISOString() > '2012-11-04T14:51:06.157Z'