Seite 1 von 1

Verfasst: 19.11.2002 21:15
von Marquee
hab nochmal ne andere Frage.. hab gerad gesehen, dass meine Zeit- und Datumsanzeige bei Ende eines Vote's nicht richtig war...

Ich glaub, den betreffenden Teil in der Viewtopic.php gefunden zu haben
$sql_votes = mysql_query("SELECT * FROM ".$table_prefix."vote_desc ORDER BY vote_id");
for ($v = 0; $v < mysql_num_rows($sql_votes); $v++)
if (mysql_result($sql_votes, $v, "vote_id") == $vote_id) $vote_nr = $v;
$vote_end = mysql_result($sql_votes, $vote_nr, "vote_start") + mysql_result($sql_votes, $vote_nr, "vote_length");
if (time() < $vote_end) { $vote_end = sprintf($lang['VOTE_UNTIL']) . ": " . date ("d.m.Y H:i",$vote_end); }
else if (mysql_result($sql_votes, $vote_nr, "vote_length") == 0) { $vote_end = sprintf($lang['VOTE_ENDLESS']) ; }
else { $vote_end = sprintf($lang['VOTE_CLOSED']) ; }
Den roten Teil hab ich bereits in das richtige Datumsformat geändert.. nur die Zeitanzeige stimmt nicht :( .. mein Server steht in den USA, d.h. ich brauch GMT +12.. wie mach ich das?

Gruß

Maloon

Verfasst: 20.11.2002 12:18
von Acid
..ersetz ma diesen Code mit ..

Code: Alles auswählen

		if ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] > time() )
		{
		        $vote_end = $lang['Vote_until'] ." ". create_date($board_config['default_dateformat'], ($vote_info[0]['vote_start'] + $vote_info[0]['vote_length']), $board_config['board_timezone']);
		} 
		else if ( $vote_info[0]['vote_length'] == 0 )
		{
		        $vote_end = $lang['Vote_endless'];
		} 
		else
		{
		        $vote_end = $lang['Vote_closed'];
		} 

Verfasst: 20.11.2002 15:54
von Marquee
super.. danke :)

funtkioniert wohl .. obwohl ich jetzt nur noch GMT +11 (statt GMT +12)eingestellen musste.. hehe

Gruß

Maloon