I currently live in Europe and I work for an American client. Long story short, they have asked me to create a countdown banner for Mother's day coming up, and I am having a little bit of an issue making this countdown banner end time synchronous for the different timezones of the U.S.
const currentTime = new Date().getTime(); // Returning current time in miliseconds
const endDate = new Date('May 3, 2022 23:59:59').getTime(); // This returns the endDate in miliseconds
I'm not sure how to handle the endDate so that it returns the correct endDate whether the user is in Texas or El Paso or wherever. The endDate always needs to be May 3 of 2022
Thank you!