In the app, I am developing I have a date `input` field.

I want to use it to search the `appointments` collection on a specific date.

On the server, I am dealing with all dates in `UTC` and this is how the search is going

```
  const date = // date in iso sent from client
  const startDate = new Date(date);
  const endDate = new Date(date);
  startDate.setUTCHours(0);
  endDate.setUTCHours(24);
  query.date = {
    $gte: startDate,
    $lt: endDate,
  };

```

The problem is whenever I search for a date from an `input` field some quirks are happening like

When I send to the date in `ISO` some searches from one day before will appear depending on the hours of that appointment.

I tried to change the date like this `date.setHours(0)` then send the `ISO` string, the same thing happens only difference the problem shows up when the hour of the appointment is over 5 AM in `UTC`

what should I do in this case?