When the time zone of the Windows operating system is set to the America/Asuncion time zone, the time zone offset error is one hour.
Describe the bug When the time zone of the Windows operating system is set to the America/Asuncion time zone, the time zone offset error is one hour. Daylight Saving Time: UTC-3 Standard Time: UTC-4
Windows操作系统时区设置为(UTC-04:00) 亚松森 时区,时区偏移量误差1小时。 夏令时是:UTC-3 标准时间是:UTC-4
it('test America/Asuncion', () => {
const testDate = dayjs.utc('2025-03-23T03:20:57.000+00:00').tz('America/Asuncion').format('YYYY-MM-DD HH:mm:ssZ')
expect(testDate).toBe('2025-03-22 23:20:57-04:00')
})
Result 2025-03-22 23:20:57-05:00
Expected behavior 2025-03-22 23:20:57-04:00
Information
- Day.js Version - 1.11.13
- windows 10
- Browser [chrome 132.0.6834.84]
- Time zone: [GMT-04:00 DST (America/Asuncion)]
FYI On october 2024 the Congress of Paraguay passed a bill to observe UTC-3 permanently, equivalent to permanent DST
https://lists.iana.org/hyperkitty/list/[email protected]/thread/LXAN4PAEWYEWQJVYGSJ5NPIWWYQ2NHFZ/
FYI On october 2024 the Congress of Paraguay passed a bill to observe UTC-3 permanently, equivalent to permanent DST
https://lists.iana.org/hyperkitty/list/[email protected]/thread/LXAN4PAEWYEWQJVYGSJ5NPIWWYQ2NHFZ/
Therefore, the calculation should be UTC-3 or UTC-4 instead of UTC-5.
I got -4
https://codesandbox.io/p/sandbox/htxgsy
I got -4 https://codesandbox.io/p/sandbox/htxgsy
Set the time zone of the Windows operating system to be the same as the time zone to be tested.
Can the problem be reproduced? @Qiming-Liu
Yeah, I think it is the same as https://github.com/iamkun/dayjs/issues/2303
