1

I am having a Date variable effectiveDt in the format Tue Oct 23 2018 00:00:00 GMT-0400 (Eastern Daylight Time)

I want to get the Zone id (eg. America/Dominica, US/Hawaii etc..) from the above date I tried effectiveDt.getTimezoneOffset() which gives only the offset value

Please suggest how to retrieve the zone id

Thanks in advance

T V Siva Teja
  • 11
  • 1
  • 3

1 Answers1

1

Internalization Api can be used for getting the user timezone.

console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)
Introvert
  • 76
  • 8