Seite 1 von 1

Easy Events Mod Uhrzeit Problem

Verfasst: 08.09.2007 11:35
von 240929Gast
Tach auch,

habe mir oben genannten Mod eingebaut. Habe das Problem das das Erstellungsdatum des Events mit 01.01.1970 angezeigt wird. Ich bekomms auch nicht raus worans liegt.

Ich vermute mal es liegt an dem putenv('TZ=GMT'); Hat jemand ne Idee ???

Code: Alles auswählen

<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_EVENTS);
init_userprefs($userdata);
//
// End session management
//

//announce

//date functions - Change to local timezone

putenv('TZ=GMT');

 	$sql = "SELECT id, title, edate, doors, location, content, flyer, sdate FROM " . EVENTS . " ORDER BY ID DESC LIMIT 3 ";
if ( ! ( $result = $db->sql_query($sql) ) )
{
   message_die(GENERAL_ERROR, 'Error retrieving user data', '', __LINE__, __FILE__, $sql);
}
$events = array();
while( $events[] = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
$total_events = count($events);



for ($t = 0; $t < $total_events; $t++)
{
	if ($events[$t]['content'] <> ''){

	$template->assign_block_vars('events', array(
	'event_content' => $events[$t]['content'],
	'event_title' => $events[$t]['title'],
	'event_edate' => $events[$t]['edate'],
	'event_location' => $events[$t]['location'],
	//'event_doors' => $events[$t]['doors'],
	'event_flyer' => $events[$t]['flyer'],
	'event_sdate' => date("m.d.y H:i",$announce[$t]['date'])));
}
}


 $template->set_filenames(array(
         'body' => 'events.tpl')
      );

      $page_title = 'Events'; // You'll have to set this in a $lang file somewhere
      include($phpbb_root_path . 'includes/page_header.'.$phpEx);



$template->assign_vars(array(
	)
);
 $template->pparse('body');

 include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
THX