-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(NativeDateAdapter): work around wrong javascript native Date-to-string conversions #10068
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I just want to do some manual testing before approving
* very frequently, and the current valid rule is not always valid in previous years though. | ||
* We work around this problem building a new Date object which has its internal UTC | ||
* representation with the local date and time. | ||
* @param dtf Intl.DateTimeFormat object, containg the desired string format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a note that dtf
must have its timeZone
set to 'utc'
for this method to work properly
Ok I tested Linux, Mac, and IE attempted to reproduce the issue described in #7167 (comment) and it seemed to work fine on all browser & OS's that I tested. So looks good |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
It looks like javascript messes things up when trying to apply DST rules to format some past dates during the Date-to-string conversions. The issue pops up when the past dates don't follow today's DST rules for a given locale (usually as a result of each local government decisions).