timezone doesn't work
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Describe:
When applying the time zone: dayjs.tz(dayjs().utc(true).toISOString(), 'Asia/Dubai')
taking into account the time in Brazil, the right thing was to add +7 hours ahead, but the negative calculation occurs (-7) and it subtracts. The same happens with the New York ("America/New_York") time in relation to Brazil, instead of decreasing -1 hour, it is adding +1 hour in relation to Brazil.
Expected:
invert the library's timezone calculation from what it is today
Date and time of code print test:
Brazil: 15-08-2023 13:00


Information:
- "dayjs": "^1.11.7",
- "react-native": "0.71.2",
- Time zone: [e.g. GMT-03:00 DST (Pacific Daylight Time)]
Contributor guide
Research direction
Start with the reported dayjs.tz(dayjs().utc(true).toISOString(), 'Asia/Dubai') entry point and reproduce the Brazil, Dubai, and New York offset cases. Compare the observed offsets with the expected relationships in the issue and verify that the corrected timezone behavior is covered by regression tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- localization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100