-
Notifications
You must be signed in to change notification settings - Fork 651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intl.DateTimeFormat throws and RangeError "Invalid timezone name!" when valid IANA timezone is provided #572
Comments
Please, pay attention to this PR. I have investigated the source of the issue and tried to provide fix for this bug. |
Any updates here? |
Would be great if this could be fixed. |
Any update with this issue? |
Similarly encountering this. Am also using Luxon like it seems like a few other on this thread may be. Of note, I can use @formatjs polyfills to get around the error, but for whatever reason the @formatjs polyfills cause intolerably slow performance on Android. The app becomes virtually unusable. @Huxpro This is, unfortunately, a huge (but I think the last) blocker to my migrating to Hermes, as you had suggested here when you added the "show source" directive: mrousavy/react-native-vision-camera#292. |
Some information about this here: andreialecu/formatjs-datetimeformat-perf#1 There's a patch at the bottom of the thread which helps quite a lot. However, now that the linked PR has been merged, I'm hoping to be able to get rid of the formatjs polyfills entirely myself. |
Hi, guys! Thanks for your updates! Could you please confirm that this issue is resolved with latest Hermes updates? |
This is indeed resolved as of Hermes 0.10.0 and later. |
It's a really great news! Thanks guys! Could we close the issue? |
It was fixed in scope this PR. |
Bug Description
Intl.DateTimeFormat API for Android is broken. Please see
Steps To Reproduce
section to understand the problem.gradle clean
and confirmed this bug does not occur with JSCHermes version: 0.8.1
React Native version (if any): 0.65.0-rc.4
OS version (if any): macOS BigSur 11.5.1 (Intel)
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): x86
Steps To Reproduce
Intl.DateTimeFormat
with valid IANA timeZonecode example:
Actual Behavior
Throws an
RangeError: com.facebook.hermes.intl.JSRangeErrorException: Invalid timezone name!, js engine: hermes
The Expected Behavior
Should not throw any errors and print to console
"8/13, 10:00 AM"
The text was updated successfully, but these errors were encountered: