-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix: The time zone offset is incorrectly calculated when the DST exits at 00:00. #2835
base: dev
Are you sure you want to change the base?
Conversation
Can you help review the code? Thanks @iamkun |
America/Asuncion时区是0点跳变所以会出现这个问题。测试了2024-03-24的夏令时跳变也是有问题的。所以如果是在0点跳变夏令时的都是有问题的这是一个共性问题。 This problem occurs because the America/Asuncion time zone changes from 00:00. Tested 2024-03-24 DST jump is also problematic. Therefore, if the DST is changed at 00:00, it is a common problem. it('test America/Asuncion', () => {
const testDate = dayjs('2024-03-24T03:20:57.000+00:00').tz('America/Asuncion').format('YYYY-MM-DD HH:mm:ssZ')
expect(testDate).toBe('2024-03-23 23:20:57-04:00')
}) Result "2024-03-23 23:20:57-05:00" |
Please add test, thanks! |
npm run test-tz4 done @Qiming-Liu |
Nice work! |
Okay, thank you. |
Yeah, that's fine. Before creating the pull request, you can remove the changes that were made to |
fix: #2834 #2303