moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.33k stars 730 forks source link

Locale incorrect when using Arc web browser #1513

Closed WizBangCrash closed 1 year ago

WizBangCrash commented 1 year ago

Describe the bug The luxon.DateTime.now().locale function incorrectly reports the browser locale as 'en-US' when using the Arc web browser. The locale has been set to 'en-GB' and the function window.navigator.language returns 'en-GB'.

To Reproduce

  1. Install Arc and set the default locale to anything other than 'en-US' e.g. 'en-GB'
  2. Open a website using luxon in the Arc browser
  3. Open the developer console and run luxon.DateTime.now().locale
  4. The function returns 'en-US'
  5. Run window.navigator.language
  6. The function returns 'en-GB'

Actual vs Expected behavior See steps 1 to 6 above

Desktop (please complete the following information):

Additional context Running the same commands on the same webpage running in Safari or Brave return the locale en-GB

diesieben07 commented 1 year ago

Please check the result of new Intl.DateTimeFormat().resolvedOptions().locale, which is what Luxon uses to determine your system locale.

WizBangCrash commented 1 year ago

Please check the result of new Intl.DateTimeFormat().resolvedOptions().locale, which is what Luxon uses to determine your system locale.

Thanks for the quick response.

The result in the Arc browser is: 'en-US' and in the Safari browser is 'en-GB'

diesieben07 commented 1 year ago

Sounds like a bug in the Arc browser then. Unfortunately I cannot test this myself, because the browser is not available for download at the moment. I suggest you file a bug report with them.

WizBangCrash commented 1 year ago

Thanks @diesieben07 . I have raised it as a bug with Arc and am awaiting a response from them.

WizBangCrash commented 11 months ago

For info. Arc confirmed it was a bug at their end. It will be fixed in v1.15 of the browser.