How to get the current date or/and time in seconds

var seconds = new Date().getTime() / 1000;

….will give you the seconds since midnight, 1 Jan 1970

Reference

Leave a Comment