0

Is there a way to detect and get current timezone in this format:

 United States; Eastern time (GMT -4:00)

I tried with

  var d = new Date();
  var n = d.toTimeString();

It returns - "16:17:15 GMT-0500 (Eastern Standard Time)". How can I get the country name with this.

amar
  • 443
  • 4
  • 15
  • Does this answer your question? [Convert date to another timezone in JavaScript](https://stackoverflow.com/questions/10087819/convert-date-to-another-timezone-in-javascript) – mgm793 Nov 17 '20 at 16:02
  • 1
    It's not difficult to convert the value returned by *getTimezoneOffset* to ±H:mm format, the rest of the information is not present anywhere in the supplied timestamp so impossible for a parser or formatter to determine. – RobG Nov 17 '20 at 20:28

0 Answers0