-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Setting timezone (again) #1892
Comments
Does anyone have an update or workaround on this? |
@hmanicka posted a gist 2 years ago, but I would rather let the client do at least the conversion to local time. My approach has 2 advantages: bringing some load to the client rather than the server, and automatically getting the user's timezone. Unfortunately, I am not able to make it work with datepicker. This is not an issue to me, as nowadays browser's UI for datetime-local is excellent.
|
Hello,
Flask-Admin seems to show all
timestamp
fields as if they were UTC (which is also set in the locale of the server). However, I would like to show the dates in GMT+2, which is the timezone of all users of my app - without having to reconfigure the server it is running on.I found #1246, which is now closed, referring to #772, which in fact discusses a different issue, and I have to concur with the last poster, that the solution there doesn't work - nothing at all changes in my forms if I override the widgets like described.
I also tried using Flask-BabelEx, setting the locale to 'cs' using
@babel.localeselector
, which successfully changed the form labels, but not the timezone - and changing the timezone directly, using@babel.timezoneselector
, which also had no effect.Is there a way to set Flask-Admin's timezone?
The text was updated successfully, but these errors were encountered: