javascript setHours date set to previous date

Viewed 3074

I want to set time to 0 using javascript's setHours() method but it changes the day of the month to one less than the actual day. Sample code:

var d = new Date();  //2017-09-18T04:58:34.223Z
d.setHours(0,0,0,0);  //2017-09-17T18:30:00.000Z
5 Answers
Related