Javascript Date toUnixTime()
toUnixTime()
Date.prototype.toUnixTime = function() { return Math.round(this.getTime() / 1000); };