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;
Written by Carlos Bacelar
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Related Tags
#javascript
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#