+00:00 timezone bug
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When we have +00:00 timezone offset like 'Europe/London" dayjs gets users timezone offset, which causes incorrect time showing in different cases.
Example
Current behavior:
dayjs('2021-10-31T15:00:00+00:00').tz('Europe/London').format() // 2021-10-31T15:00:00Z
**Expected behavior**
Behavior after fix:
dayjs('2021-10-31T15:00:00+00:00').tz('Europe/London').format() // 2021-10-31T15:00:00+00:00
**Information**
- Day.js Version [v1.11.20]
- OS: [iOS]
- Browser [Chrome 147]
- Time zone: [BST]
Contributor guide
Research direction
Start by running the reported dayjs timezone example with the +00:00 offset and Europe/London, then trace the timezone parsing and formatting entry points involved. The fix is complete when the example preserves +00:00 instead of formatting as Z, with a regression test covering this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100