var x = new Date(); var now = x.getTime(); var gmt = 1216994509 * 1000; var diffms = (now - gmt);