valueOf offset calculate not correctly, when crossing summertime
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
valueOf offset calculate not correctly, when crossing summertime, it subtract one more hour
**Expected behavior**
valueOf should be correct
**Information**
- Day.js Version v1.10.8
- system timezone Europe/Warsaw
- system date 2022-03-01
- dayjs.tz.setDefault('Europe/Warsaw')
- dayjs.tz().endOf('month').valueOf() -> 1648760399999, it should be 1648763999999
Contributor guide
Research direction
Reproduce the issue with Day.js v1.10.8 using the Europe/Warsaw timezone, dayjs.tz.setDefault('Europe/Warsaw'), and dayjs.tz().endOf('month').valueOf(). Trace the timezone and end-of-month calculation from that entry point; done means the result is 1648763999999 rather than 1648760399999 when crossing summertime.
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
- 35/100