Skip to content

[backport] Pick a fix for valid timezones on Apple platforms#1723

Open
navarroaxel wants to merge 1 commit intofacebook:rn/0.79-stablefrom
navarroaxel:backport/0.79-ios-fix-timezone
Open

[backport] Pick a fix for valid timezones on Apple platforms#1723
navarroaxel wants to merge 1 commit intofacebook:rn/0.79-stablefrom
navarroaxel:backport/0.79-ios-fix-timezone

Conversation

@navarroaxel
Copy link
Contributor

This PR backports b8ad3c1 from rn/0.80-stable to RN 0.79.

I made a custom build of Hermes in my local and it worked as expected fix my app 🙌

@facebook-github-bot
Copy link
Contributor

Hi @navarroaxel!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

…acebook#1611) (facebook#1611)

Summary:
Original Author: chris@nschris.com
Original Git: b8ad3c1
Original Reviewed By: avp
Original Revision: D70109465

This addresses issue facebook#1607 where valid timezones were raising invalid time zone errors. The root of the issue is that hermes relies on `NSTimeZone.knownTimeZoneNames` to determine valid time zones, but this does not provide a complete list of all time zones NSTimeZone supports. `US/Eastern` is an example of a timezone that is not listed in knownTimeZoneNames but will generate a valid NSTimeZone.

To address this problem this will first attempt to create an NSTimeZone before raising the range exception.  If it's a valid time zone then it will get added to the validTimeZoneNames list, otherwise an exception will be raised.

Pull Request resolved: facebook#1611

Pulled By: lavenzg

Reviewed By: lavenzg

Differential Revision: D71332435

fbshipit-source-id: 3f8c11003d31736c28bab64a3362fc3cf5946379
@navarroaxel navarroaxel force-pushed the backport/0.79-ios-fix-timezone branch from 7e00dc8 to 4e15832 Compare June 22, 2025 21:47
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 22, 2025
@navarroaxel
Copy link
Contributor Author

@tmikov Hello, Should I do something to move this PR ? Thanks

@tmikov
Copy link
Contributor

tmikov commented Jun 27, 2025

We just haven't gotten to it yet. We will.

@CavalcanteLeo
Copy link

CavalcanteLeo commented Oct 3, 2025

how that goes? im using a workaround with https://github.com/vvo/tzdb/ by now, which is adding complexity and increasing bundle size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants