Daylight Savings Timezone Detection From Strings In JavaScript
Clash Royale CLAN TAG #URR8PPP Daylight Savings Timezone Detection From Strings In JavaScript I've looked in several places but I could not find a solution to this problem. I have some data I'm trying to import and for my case, it contains strings representing dates which are in the Eastern Time Zone (ET). Strings look like this: July 28, 2018 03:39 PM If I try to create a new date object in JavaScript, I can create the new date object, but the problem is that there is no ET timezone, so I can create it either using EST (Eastern Standard Time) or EDT (Eastern Daylight Time). ET EST EDT console.log(new Date('July 28, 2018 03:39 PM EST')); 2018-07-28T19:39:00.000Z Or console.log(new Date('July 28, 2018 03:39 PM EDT')); 2018-07-28T20:39:00.000Z We can clearly see there is one hour difference between both. The rules to determine if Daylight Saving is active or not seems quite complex and can vary from geographic region. So my question is: is there any solution ou...