i have modified this a little bit for my forum and i thought i would share.
instead of
PHP Code:
if($event['dateline_to'] == 0 )
{
$format = sprintf("On %s",date('jS M Y',$event['dateline_from']));
} else {
$format = sprintf("From %s to %s",date('jS M Y',$event['dateline_from']),date('jS M Y',$event['dateline_to']));
}
i used
PHP Code:
$format = sprintf("On %s at %s", vbdate('jS M, Y',$event['dateline_from']), vbdate('g:i A', $event['dateline_from']));
this does a couple things different.
first i changed the format to look like 'On 5th Feb, 2013 at 8:00 PM'. the end date wasnt as important to us as the time the event started so i added the time and removed the end date.
second it uses the vbulletin 'vbdate' function instead of the PHP 'date' function. this will automatically change the date to the users timezone instead of using the servers timezone. remember to set 'Cache Time' to 0 in the forum block settings or else it will cache someone elses timezone and be incorrect for every other user.
hope this helps someone else trying to do something similar.
and a screenshot of how it looks on my forum.