0

In French windows(windows 7 OS language set as French) i am using the following code to get the time zone name but i am getting the time zone name in French language which i wanted in English.

   function getTimeZone() {
        return /\((.*)\)/.exec(new Date().toString())[1];
   }
Swarup
  • 13
  • 5

1 Answers1

0

I don't believe javascript's native implementation will give you an output in different languages. You'll have to use a library with i18n like Moment.js.

Jeremy Thille
  • 26,047
  • 12
  • 43
  • 63