Last Updated: February 25, 2016
·
428
· cbacelar

Midnight of the current day timestamp

I guess this is not the better way. But it works.

var now = new Date();
var utc = new Date(Date.UTC(
  now.getFullYear(),
  now.getMonth(),
  now.getDate(),
  0,
  0
));

t = utc/1000;