-
Notifications
You must be signed in to change notification settings - Fork 7
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
RangeError: Incorrect timeZone information provided #32
Comments
This is probably unrelated to the library, close this issue. |
Re-open this as this is related to the library. Since date-fns/tz is using Intl.DateTimeFormat to convert timezones, and Intl.DateTimeFormat is not fully supported in the react-native env. This makes the library incompatible in for react-native apps. |
I also just learned this the hard way, my react-native Android app is now crashing since I am migrating over It probably is react-native's fault for not fully implementing the API, and yet it is still this library's problem. so if possible to get this compatible with react-native that would be great |
I should solve it, and I don't think it's impossible, but I need some help setting up a proper environment to test it. If somebody can help me set up a minimal repro repo, I will pull it and integrate it into CI. |
here is a quick repo in Expo showing it failing on both iOS and Android |
I'm using this library with react-native on Android and IOS with this patch #17 without any issues so far. |
@kossnocorp seeing this seems to be similar to #17, on incomplete or erroneous TimeZone implementation on React Native's part, I'd be willing on attempting to create a replicable repro, based on all the expo snacks the community has offered on this issue and see if I could write some tests to replicate these and any possible fix, like my suggested patch. My worry is that this seems to be strictly an issue on the native side, as in you'd need an E2E setup on your CI pipelines to properly test it, as any node-run tests would be false negative failures (oh I hate that double negative, lol). That's something I don't have experience in but know ahead of time that it is a lot of effort and possibly expensive, like needing a mac CI runner for any iOS build. The proper-est solution would be to escalate the issue as well to the RN's team. Going to think how one could go about that, as having inconsistent output is not necessarily a bug on their end, browsers do that all the time as well. |
Env:
Mac: 15.1.1
node: v18.20.2
When I run
or
I got this error: RangeError: Incorrect timeZone information provided
So I added below code to validate
output
The text was updated successfully, but these errors were encountered: