javascript tími í sekúndum
const ts = () => Math.floor(new Date().getTime() / 1000);
javasctipt unix tími frá stefnumótinu
Math.round(new Date().getTime() / 1000).toString()
hvernig á að fá tími í javascript á stefnumót hlut
new Date().getTime()
new Date().valueOf()
hnút fá unix tími
Math.floor(new Date() / 1000) // in seconds
hnút js unix tími
function getUnixTime() {
return (Date.now() / 1000) | 0;
}