javascript date object get milliseconds since epoch code example
Example: get milliseconds since epoch for 12am today javascript
var d = new Date();
d.setUTCHours(0,0,0,0);
console.log(+d);
var d = new Date();
d.setUTCHours(0,0,0,0);
console.log(+d);