TimeZone conversion gives different output as compared to moment
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
I am trying shift to dayjs from moment. But I found strange behavior on timezone conversion.
```
moment.tz([ 2024, 2, 13 ], 'America/New_York').format() // "2024-03-13T00:00:00-04:00"
dayjs.tz([2024, 2, 13], 'America/New_York').format() // "2024-03-12T14:15:00-04:00"
```
These two should give same result. But why is it not same?
Contributor guide
Research direction
Reproduce the two timezone conversion calls shown in the issue and trace the Day.js timezone conversion entry point used by dayjs.tz. Compare the resulting local date and offset with Moment's output; done means the same input produces the expected 2024-03-13T00:00:00-04:00 result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100