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

Example: display datetime fields in client's timezone and save user's input in UTC #2502

Merged
merged 8 commits into from
Aug 11, 2024

Conversation

ElLorans
Copy link
Contributor

@ElLorans ElLorans commented Aug 8, 2024

This example shows how to make Flask-Admin display all datetime fields in client's timezone.
Timezone conversion is handled by the frontend in /static/js/timezone.js, but an
automatic post request to /set_timezone is done so that flask session can store the
client's timezone and save datetime inputs in the correct timezone.

fixes: #1892

@ElLorans ElLorans mentioned this pull request Aug 8, 2024
18 tasks
Copy link
Contributor

@samuelhwilliams samuelhwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🙏

@samuelhwilliams samuelhwilliams merged commit c235734 into pallets-eco:master Aug 11, 2024
11 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Setting timezone (again)
2 participants