UTC dates in Javascript
UTC dates in Javascript
by secretgspot
JavaScript
var now = new Date();
var now_utc = new Date(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate(), now.getUTCHours(), now.getUTCMinutes(), now.getUTCSeconds());
document.write(now_utc.getTime());
document.write('<br/>');
document.write(new Date().getTime());