I am using the following function to get the Time using javascript:
function timeMil(){ var date = new Date(); var timeMil = date.getTime(); ret
Try dividing it by 1000, and use parseInt method.
const t = parseInt(Date.now()/1000); console.log(t);