-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
14.x
Description
As part of the update to Luxon 3 for the LuxonDateAdapter, a change was made so that setZone(undefined)
is called whenever useUtc
is not enabled on the options. This means that now there are now only two possibilities when using the adapter:
- Use UTC via the adapter options
- Use the default zone from Luxon
Previously, if useUtc
was not set, the adapter would keep the timezone that had been set on the Luxon DateTime object.
This is either an undocumented breaking change (with no clean way to get the previous behavior) or a regression.
Reproduction
Steps to reproduce:
- Create a Luxon DateTime with a zone different from the default zone, where it falls on a different day than it would when shifted into the default zone.
- Set the DateTime as the value for a form control using the LuxonDateAdapter.
Expected Behavior
The form control shows the date as set on the date time object.
Actual Behavior
The form control shows the date shifted into the default time zone.
Environment
- Angular: 15.2.5
- CDK/Material: 15.2.5
- Browser(s): Firefox 111.0, Chrome 111.0
- Operating System (e.g. Windows, macOS, Ubuntu): Ubuntu
Metadata
Metadata
Assignees
Labels
needs triageThis issue needs to be triaged by the teamThis issue needs to be triaged by the team