diff -r adb7f8de8ce1 -r 7468a663315f plugins/SpecialUserPrefs.php --- a/plugins/SpecialUserPrefs.php Fri Feb 08 12:16:43 2008 -0500 +++ b/plugins/SpecialUserPrefs.php Fri Feb 08 23:20:20 2008 -0500 @@ -152,6 +152,7 @@ { global $db, $session, $paths, $template, $plugins; // Common objects global $lang; + global $timezone; // We need a login to continue if ( !$session->user_logged_in ) @@ -483,6 +484,9 @@ $real_name = htmlspecialchars($_POST['real_name']); $real_name = $db->escape($real_name); + $timezone = intval($_POST['timezone']); + $tz_local = $timezone + 1440; + $imaddr_aim = htmlspecialchars($_POST['imaddr_aim']); $imaddr_aim = $db->escape($imaddr_aim); @@ -536,7 +540,7 @@ $session->user_extra['user_hobbies'] = $hobbies; $session->user_extra['email_public'] = intval($email_public); - $q = $db->sql_query('UPDATE '.table_prefix."users SET real_name='$real_name' WHERE user_id=$session->user_id;"); + $q = $db->sql_query('UPDATE '.table_prefix."users SET real_name='$real_name', user_timezone = $tz_local WHERE user_id=$session->user_id;"); if ( !$q ) $db->_die(); @@ -592,6 +596,26 @@ $lang_box .= ''; + $tz_select = ''; + echo '