I have the following range that needs to be calculated:
const range = (new Date(endDate) - new Date(startDate))
Where startDate and endDate are: "2020-11-03 17:34:24"
, "2021-05-06 18:34:1"
How can I convert this to using UTC so that the seconds will remain the same for all browsers?
I was thinking of converting them using Date(startDate).toISOString()
then feeding that in the newDate object would that make sense?