Insert Hour and Minute to mongoDB date in node js

I am trying to insert a date with user specific time. User will select any time say, 08:30 And I need to insert that time to mongodb with the current date. I am trying to insert it like this

new Date().setHours(08,30)

but this gives me something like this 1632272411458. And I need it to get inserted in the below format

2021-09-22T08:30:00.00+00:00

Answer

Use it like

var date = new Date();
date.setHours(08, 30);