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

[pickers] Fix DST issue with America/Asuncion timezone and AdapterMoment #15552

Merged
merged 2 commits into from
Nov 28, 2024

Conversation

flaviendelangle
Copy link
Member

Fixes #14730

@flaviendelangle flaviendelangle added bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! time-zone Issues about time zone management labels Nov 22, 2024
@flaviendelangle flaviendelangle self-assigned this Nov 22, 2024
@flaviendelangle flaviendelangle marked this pull request as ready for review November 22, 2024 09:11
current = this.addDays(current, 1);
currentDayOfYear = current.get('dayOfYear');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original snippet uses .diff but it also work if you just check the dayOfYear property which is a lot cheaper to access.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is a way more efficient and easier to understand solution.
Great job. 👍

@flaviendelangle flaviendelangle added needs cherry-pick The PR should be cherry-picked to master after merge v7.x labels Nov 22, 2024
@mui-bot
Copy link

mui-bot commented Nov 22, 2024

Deploy preview: https://deploy-preview-15552--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 4bcaab5

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not feel like a very high price to pay for covering "maintenance mode" adapter edge-cases. 👌

current = this.addDays(current, 1);
currentDayOfYear = current.get('dayOfYear');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this is a way more efficient and easier to understand solution.
Great job. 👍

@flaviendelangle flaviendelangle merged commit d10bae9 into mui:master Nov 28, 2024
16 checks passed
@flaviendelangle flaviendelangle deleted the asuncion-timezone branch November 28, 2024 13:30
Copy link

Cherry-pick PRs will be created targeting branches: v7.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! needs cherry-pick The PR should be cherry-picked to master after merge time-zone Issues about time zone management v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers] DateCalendar shows duplicate dates for DST when using AdapterMoment
3 participants