JS: Create UTC from new Date
Here's how to create a UTC using Javascript.
function utc() {
var now = new Date();
return new Date(convertDateToUTC(now)).toJSON().toString();
}
function convertDateToUTC(date) {
return new Date(
date.getUTCFullYear(),
date.getUTCMonth(),
date.getUTCDate(),
date.getUTCHours(),
date.getUTCMinutes(),
date.getUTCSeconds());
}
}