Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #2834

Open
xingyixiang opened this issue Mar 5, 2025 · 8 comments · May be fixed by #2835

Comments

@xingyixiang
Copy link

xingyixiang commented Mar 5, 2025

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)]
@xingyixiang
Copy link
Author

Image Image

@fformigli
Copy link

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/

@xingyixiang
Copy link
Author

xingyixiang commented Mar 6, 2025

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.

@Qiming-Liu
Copy link

@xingyixiang
Copy link
Author

I got -4 https://codesandbox.io/p/sandbox/htxgsy Image

Set the time zone of the Windows operating system to be the same as the time zone to be tested.

@xingyixiang
Copy link
Author

Can the problem be reproduced? @Qiming-Liu

@Qiming-Liu
Copy link

Yeah, I think it is the same as #2303

@xingyixiang
Copy link
Author

Yeah, I think it is the same as #2303

It's the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants