unix date to integer javascript code example Example: get epoch timestamp js Math.floor(Date.now() / 1000)