Setting PHP's default timezone

后端 未结 3 1580
离开以前
离开以前 2021-01-28 11:55

In my web app, I let the users choose their preferred timezone from a list (that contains all timezones that PHP supports).

Let\'s say that $_POST[\'timezone\']

3条回答
  •  醉梦人生
    2021-01-28 12:30

    You should save it in the database and set the timezone any time you do anything time related. It's working properly. It's only supposed to set it for that script execution (one HTTP request).

提交回复
热议问题