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
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