Intl.DateTimeFormat() returns short timeZoneName with GMT offset removed in some locales #1601
Open
2 tasks done
Labels
bug
Something isn't working
Bug Description
Intl.DateTimeFormat()
returns short timeZoneName with GMT offset removed in some locales.gradle clean
and confirmed this bug does not occur with JSCHermes git revision (if applicable):
React Native version: 0.77.0
OS: iOS 18.2.1
Platform (most likely one of arm64-v8a, armeabi-v7a, x86, x86_64): running on iPhone, so I guess one of the arm ones
Steps To Reproduce
gives the following output
The Expected Behavior
FWIW, I see the correct output in Android 14, and by "correct" I mean the output I see in Firefox and Chrome,
GMT-10
(I would expect it to beHST
like it is inen-US
, but an accurate offset seems preferable to an inaccurate short name).I am pretty sure this is just due to
formatToParts()
behaving a bit differently. The-
and10
are in subsequent parts asliteral
andyear
elements. That's just not how the method behaves in a browser.Related: marnusw/date-fns-tz#306
The text was updated successfully, but these errors were encountered: