folgende funktion in die functions.php mit einfügen:
Code: Alles auswählen
function get_tz_offset($tz, $gmepoch)
{
global $board_config, $lang, $userdata;
switch ( $userdata['user_time_mode'] )
{
case 1:
return (3600 * $tz) + $userdata['user_dst_time_lag'] * 60;
break;
case 2:
return (3600 * $tz) + date('I', $gmepoch) * $userdata['user_dst_time_lag'] * 60;
break;
case 3:
return date('Z');
break;
case 4:
case 5:
if ( isset($HTTP_SESSION_VARS['pc_timezoneoffset']) )
{
return $HTTP_SESSION_VARS['pc_timezoneoffset'] * (-60);
} else
{
return $userdata['user_pc_time_offset'];
}
break;
case 6:
if ( isset($HTTP_SESSION_VARS['pc_time_offset']) )
{
return $HTTP_SESSION_VARS['pc_time_offset'];
} else
{
return $userdata['user_pc_time_offset'];
}
break;
default:
return 3600 * $tz;
break;
}
}
Code: Alles auswählen
$next_quiz = mktime($HTTP_POST_VARS['next_quiz_hour'], $HTTP_POST_VARS['next_quiz_minute'], 0, $HTTP_POST_VARS['next_quiz_month'], $HTTP_POST_VARS['next_quiz_day'], $HTTP_POST_VARS['next_quiz_year']) - ( 3600 * $board_config['board_timezone'] ) + date('Z');
Code: Alles auswählen
$next_quiz = mktime($HTTP_POST_VARS['next_quiz_hour'], $HTTP_POST_VARS['next_quiz_minute'], 0, $HTTP_POST_VARS['next_quiz_month'], $HTTP_POST_VARS['next_quiz_day'], $HTTP_POST_VARS['next_quiz_year']) + date('Z');
$next_quiz -= get_tz_offset($board_config['board_timezone'], $next_quiz);