When Local Clock set to 12AM hour, Chrome returns incorrect TZ values
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Steps:
1. set your local clock time on your machine to the 12AM hour
2. have a script that loads dayjs and extends utc & timezone
3. open firefox and run command in console:
4. open chrome or MS edge and run the same command in console
```
dayjs
.tz(
dayjs().format('YYYY-MM-DD HH:mm'), // get local date and time
'America/Los_Angeles'
)
.day(2) // set it to Tuesday
.hour(23) // set the hour late in the day
.minute(1) // set some random minute
.tz('America/Chicago') // now convert it to a tz for the next day (should be wednesday)
.format(`dddd h:mm A [America/Chicago]`);
```
**Expected behavior**
- The day should be set to Wednesday when converting, but Chrome is saying it's Tuesday.
- Issue does not happen outside of the 12:00-12:59AM window

**Information**
- Day.js Version: 1.8.35
- OS: MacOS Catalina 10.15.6
- Browser:
- Failing Chrome Based browsers:
- Chrome 85.0.4183.83
- MS Edge 85.0.564.44
- Succeeds in Firefox:
- Firefox 80.0.1
- Time zone: GMT-07:00 DST (Pacific Daylight Time)
Contributor guide
Assessment
This issue has not been assessed yet.