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\']
Set a cookie that contains the timezone the user chooses.
/// Make sure you sanitize all POST/COOKIE variables if needed.
$timezone = $_COOKIE['timezone'];
if(isset($_POST['timezone'])) {
/// Set cookie for some amount of time -- I chose 2 weeks
setcookie('timezone',$_POST['timezone'],time()+60*60*24*14);
$timezone = $_POST['timezone'];
}
default_date_timezone_set($timezone);