get current unix time npm code example Example: nodejs current timestamp unix Math.floor(+new Date() / 1000)