The Dates in your code are still being set in local time:

e.g.

const startDate = new Date(startDateInput);

Here you’re taking the startDate argument (which is a date defined in UTC), and creating a new Date object in the local system time.

e.g. if the Start Date is 8:00pm in UTC, that’s 7:00pm in the local system time… so that’s the start date being used.

If the input date is in UTC, and you want to keep all Dates in UTC you need to set all dates as UTC Dates…

note: even if you output the list of Dates in UTC, they will still appear different to you when viewing them in your local timezone.

What exactly is it you need as the output here?