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\']
$_POST[\'timezone\']
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).