How to optimally deal with the time zone problem of multinational users in flask multi-time zone

allow users to set time zone
display time according to the time zone set by the user after login (their own and others" posting time, reply time and other different time zones set by different users will see the time of their own time zone after logging in

.)

Mar.30,2021

provides a processing idea. All the time in the database is stored in utc time. When the frontend adjusts the interface, the current time or time zone parameter is passed in the session, and the session is processed in the API to get the user's time zone. After processing the time data, return it to the front end


with a flask-moment plug-in- https://blog.csdn.net/lanchun..
who knows who uses it.

Menu