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

bug: ion-datetime does not update when the system timezone changes #30194

Open
3 tasks done
mschmermer opened this issue Feb 16, 2025 · 0 comments
Open
3 tasks done

bug: ion-datetime does not update when the system timezone changes #30194

mschmermer opened this issue Feb 16, 2025 · 0 comments
Labels

Comments

@mschmermer
Copy link

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

I’ve noticed that ion-datetime does not automatically update its timezone when the system timezone changes.

Possible solutions:
1. ion-datetime should automatically update when the device’s timezone changes.
2. Add a timeZone input property to manually set the timezone if needed.

Could you please check this behavior and consider improving ion-datetime’s timezone handling?

Thanks for all the great work on Ionic! 🚀

Let me know if you want any changes or if you’d like me to submit this issue for you! 😊

Expected Behavior

•	ion-datetime continues to use the old timezone.
•	Even though I implemented a custom Capacitor plugin to retrieve the correct system timezone, it has no effect on ion-datetime.

Steps to Reproduce

Steps to reproduce:
1. Open an Ionic app with an ion-datetime component.
2. Change the system timezone (e.g., from Europe/Berlin to America/New_York).
3. Check Intl.DateTimeFormat().resolvedOptions().timeZone to confirm the new system timezone.
4. ion-datetime still displays the old timezone until the app is restarted.

Code Reproduction URL

https://ionicframework.com/docs/api/datetime#time-zones

Ionic Info

Technical details:
• Ionic version: 8
• Capacitor version: 6
• Platforms: iOS, Android
• Custom plugin for timezone update: ✅ Yes

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant