horodatage javascript en secondes
const ts = () => Math.floor(new Date().getTime() / 1000);
javascript obtenir l'horodatage
var currentTimeInSeconds=Math.floor(Date.now()/1000); //unix timestamp in seconds
var currentTimeInMilliseconds=Date.now(); // unix timestamp in milliseconds
comment obtenir l'horodatage en javascript d'un objet date
new Date().getTime()
new Date().valueOf()
horodatage du nœud js unix
function getUnixTime() {
return (Date.now() / 1000) | 0;
}
horodatage actuel nodejs
Math.floor(new Date() / 1000)