Skip to content

Android Intl doesn't work as expectedΒ #102

Open
@deecewan

Description

@deecewan

Issue Description

To start, I've created a small repro here: https://github.com/deecewan/TimeZoneTest

I set up a brand new project (npx react-native-cli init TimeZoneTest), and then followed the steps for React Native 0.59, and added the support for Intl. This works, because the Intl object actually exists now (yay!).

The problem is, the behaviour is not the same as on iOS when trying to format dates.

Here is the output on Android:

image

And the same code on iOS:

image

The same code on Android, with remote debug enabled:

image

(Note: My android emulator is set up to be in Australia/Brisbane. The iOS Simulator is set to my laptop's TZ, in Canada. In remote debug, it uses Chrome in my laptop's TZ).

As you can see, when formatting on the iPhone and in Chrome via Remote Debugging, the output is in the TZ of the 'device'. When rendering on Android, with Intl enabled, it renders in UTC/GMT. This seems to be inconsistent with how it should be rendering.

Version, config, any additional info

See repro reop for full details

React Native 0.59.8
jsc-android: 241213.x.x
android/app/build.gradle dep: implementation "org.webkit:android-jsc-intl:r241213"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions