My issue is- using Postman to parse a JSON API response, I am getting back date and time in UTC. This value could return two possible times; one when DST is active, and one when DST is not active. This is because the time is set in the DB as EST so the delta between UTC/EST/DST is either (-4) or (-5).
As an example, lets say the time in the database is set to 01:00:00 PM Eastern. During DST, this is 05:00:00 PM UTC, during EST this is 06:00:00 PM UTC.
The issue then is, the box we are running these tests on is set to UTC. So I cannot use the delta between "local time" and UTC using getTimezoneOffset to determine the if it is currently DST using the delta. isDST() always returns false for UTC.
I am basically looking to do simple logic to say
if(isDST = true){
expect(time === 01:00:00);
}
else{
expect(time === 02:00:00);
}
Any suggestions on how I may be able to determine if DST is currently in effect in this scenario?