-
Notifications
You must be signed in to change notification settings - Fork 643
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: toLocaleTimeString does not support timeZone shift #431
Comments
Hi @dlebedynskyi, thanks for reporting this. Hermes currently doesn't have full Intl support, and one of the things we don't support is We're actively working on an Intl implementation in #23 (as you mention), and once we release support for that, this should work. We don't currently have a target release where Intl is included, but it is in active development right now. So I'm going to close this issue for now, and we can re-open if it's still occurring once the Intl implementation is released. |
As for JSC, I believe RN + JSC releases a version of JSC with Intl included, which should fix this problem on JSC. |
@dulinriley Update: JSC with Intl still has issue with Brazil DSL. |
Bug Description
I believe this should be a part of #23.
tl;dr;
timeZone options does not adjust time. As result
toLocaleTimeString
always uses timezone of the device and does not allow time adjustment to other timezones.gradle clean
andconfirmed this bug does not occur with JSCHermes version: 0.7.1
React Native version (if any): 0.64
Android version (if any): 10, android SDK simulator
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64):x86
Steps To Reproduce
code example:
Note: JSC behaviour
JSC actually has exact same behavior as Hermes now does
The Expected Behavior
Expected -
d.toLocaleTimeString('en-us', { timeZone })
will adjust timezone to desired and will allow to override device timezone. Bahaviour is expected to match V8 (Chrome) or Firefox.The text was updated successfully, but these errors were encountered: