The "timezone" plugin does not parse the timestamp in seconds
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The "timezone" plugin does not parse the timestamp in seconds
Example:
`dayjs.tz(1690278073, 'X', "Europe/London").format(); // => "1970-01-20T14:31:18+01:00"`
**Expected behavior**
`dayjs.tz(1690278073, 'X', "Europe/London").format(); // => ""2023-07-25T10:41:13+01:00"`
**Information**
- Day.js Version [v1.11.9]
- OS: [Ubuntu 20.04.6]
- Browser [chrome 115.0.5790.102]
- Time zone: [GMT+03:00]
Contributor guide
Research direction
Start with the timezone plugin and reproduce the reported call using the Day.js v1.11.9 setup. Check how the plugin handles the 'X' format and compare its output with the expected 2023 timestamp; done means the example formats correctly without regressing other timezone parsing.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100