I am calling an Api that has the dates in the following format: 2020-09-08T00:00:00Z. I want to get the current date of the user and compare it against the API date to see how much time is left. The problem is that users could be in UK or IE and the second problem how can I be sure that there is not a daylight saving time issue here. I would also like to display the dates to the user.
const userDate = new Date() //current date
const apiDate = new Date('2020-09-08T00:00:00Z') //api date
if (userDate.getTime() <= apiDate.getTime())
//do something