dayjs.tz() treats `Date` objects and `ISOString` differently
- Dominant language
- JavaScript
- Stars
- 48.7k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
If you pass the same date to the function `dayjs.tz` the result is different depending if you use a `Date` object or an ISOString representation.
**Expected behavior**
The result should be the same no matter what you use
```js
const date = new Date();
const dateString = date.toISOString();
// 2025-05-09T20:38:52.929Z
// It shifts the date if you use an iso string
dayjs.tz(dateString, 'America/New_York').toISOString();
// 2025-05-10T00:38:52.929Z
// It doesn't shift the date if you use a date object
dayjs.tz(date, 'America/New_York').toISOString();
// 2025-05-09T20:38:52.929Z
```
I'm not completely sure but this could still be happening in the last version. Here is a screenshot when I was testing this in the console in day.js.org

**Information**
- Day.js Version 1.11.10
- OS: MacOs
- Browser Firefox 138.0.1
- Time zone: GMT-5 Colombia
Contributor guide
Assessment
This issue has not been assessed yet.