Closed jdconley closed 6 months ago
Luxon can only provide data as good as the underlying platform. Hermes' implementation of the Intl.DateTimeFormat is unfortunately not great.
If you check the output of the following snippet, you will see that it likely reports "GMT-4" for timeZoneName
on Android when using Hermes:
const intl = new Intl.DateTimeFormat(undefined, { hourCycle: 'h23', year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', timeZone: 'America/New_York', timeZoneName: 'short' });
console.log(intl.formatToParts(new Date()));
You'll have to report this issue to Hermes.
Describe the bug Luxon returns a GMT-based offset for a formatted timezone when I expect a friendly short name.
To Reproduce
Create a React Native app targeting Android with Hermes enabled.
Actual vs Expected behavior On iOS this prints as expected (EST). On Android I see 'GMT-4' (as of posting).
Mobile