-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: Incorrect time displayed after selection in Datetime #25693
Comments
@pvo13 thanks for reporting this issue! When formatting the text to be displayed, we are not accounting for the timezone offset that Can you test with this dev-build and let me know if you run into any issues?
Thanks! |
I tested it with 6.2.1-dev.11659121131.15481a1f |
Thanks for confirming! I'm going to keep the issue open until a PR is added to fix this in main. The issue will auto close when it is released in an upcoming patch release. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
I use an ion-datetime component to select a date and time.
When I click on the current time to change it, scroll wheels appear and I can change the hour. If I do that, the selected value is being propagated back to the underlying component and displayed, but not the value I have chosen, but a different one. This offset in my case is two, it seems to depend on the browsers timezone. So I choose 22 and the within the component the hour part shows 20
Expected Behavior
I expect the time that I select to be exactly to be the time I then see in the component.
Steps to Reproduce
Open the ion-datetime description page and use one oft he examples that contain the time part, e.g. https://ionicframework.com/docs/api/datetime#showing-the-default-title
When I click on the current time to change it, scroll wheels appear and I can change the hour. If I do that, the selected value is being propagated back to the underlying component and displayed, but not the value I have chosen, but another one with an offset. The offset in my case is two, it seems to depend on the browsers timezone.
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (/usr/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.2.0
@angular-devkit/build-angular : 14.1.0
@angular-devkit/schematics : 14.1.0
@angular/cli : 14.1.0
@ionic/angular-toolkit : 7.0.0
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v16.16.0 (/usr/bin/node)
npm : 8.11.0
OS : Linux 5.4
Additional Information
No response
The text was updated successfully, but these errors were encountered: