Getting wrong startOf('day') and endOf('day') in a different timezone
Open
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
The functions `startOf('day')` and `endOf('day')` are returning the wrong day when I change the timezone from UTC (GMT).
Code example:
`dayjs('2023-09-01').tz('America/Sao_Paulo').startOf('day')`
Result:
`Thu, 31 Aug 2023 03:00:00 GMT`
**Expected behavior**
`Fri, 01 Sep 2023 03:00:00 GMT`
**Information**
- Day.js Version: ^1.11.3
- OS: Ubuntu 22.04.3 LTS
- Browser: Node JS 16
- Time zone: UTC (GMT)
Contributor guide
Assessment
This issue has not been assessed yet.