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

fix(datetime): default to local date #17706

Merged
merged 14 commits into from
Mar 11, 2019
Merged

fix(datetime): default to local date #17706

merged 14 commits into from
Mar 11, 2019

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Mar 6, 2019

Short description of what this resolves:

This PR fixes an issue where datetimes are not localized to the user's timezone. This PR should fix a number of datetime issues.

Changes proposed in this pull request:

  • Create a UTC-like string that has the hours localized to the user's timezone before generating columns in picker
  • Set timezone offset before passing to convertDataToISO to ensure that function does not attempt to convert timezones by itself
  • Added more tests

Ionic Version:

Fixes: #17587 #16436 #16723

@ionitron-bot ionitron-bot bot added the package: core @ionic/core package label Mar 6, 2019
@liamdebeasi liamdebeasi marked this pull request as ready for review March 8, 2019 21:08
@dominic-ks
Copy link

Hi,

Can I just ask, what version have these fixes gone into? I'm still experiencing this and I'm not sure how to check if I have the right version or not.

Thanks,

@liamdebeasi
Copy link
Contributor Author

This was fixed in Ionic 4.2. There was another bug regarding null values that was fixed in Ionic 4.4. You can view all changes for each Ionic version here: https://ionicframework.com/docs/release-notes

@MKhowaja
Copy link

Is there a way to go back to the behavior before this change? Ie ignore the user's device timezone

@MKhowaja
Copy link

@liamdebeasi One idea would be to guard the existing behaviour behind a prop that defaults to the new behaviour. This way there would atleast be a possibility of backwards compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants