node js console timestamp code example
Example 1: node get unix timestamp
Math.floor(new Date() / 1000) // in seconds
Example 2: node js unix timestamp
function getUnixTime() {
return (Date.now() / 1000) | 0;
}
Math.floor(new Date() / 1000) // in seconds
function getUnixTime() {
return (Date.now() / 1000) | 0;
}