My general approach is that when developing APIs, the time zone is not set in the database or view, or in other words, it is set to the 无时区 state by default. That is a utc time.
The timing is then handled by the API caller. You can pass in the time zone parameter, or directly get the utc time and process it. Compared with the situation xxx hours ago, UTC is OK.
Does flask have it? Isn't it set in Linux?
My general approach is that when developing APIs, the time zone is not set in the database or view, or in other words, it is set to the
无时区
state by default. That is a utc time.The timing is then handled by the API caller. You can pass in the time zone parameter, or directly get the utc time and process it. Compared with the situation xxx hours ago, UTC is OK.
The background time is unified using UTC time, and Monent.js is used when displaying on the client