'; $o .= '
' . bbcode($ev['desc']) . '
'; $o .= '' . t('Starts:') . ' ' . (($ev['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $ev['start'] /*, format */ ) : datetime_convert('UTC', 'UTC', $ev['start'] /*, format */ )) . '
'; if(! $ev['nofinish']) $o .= '' . t('Finishes:') . ' ' . (($ev['adjust']) ? datetime_convert('UTC', date_default_timezone_get(), $ev['finish'] /*, format */ ) : datetime_convert('UTC', 'UTC', $ev['finish'] /*, format */ )) . '
'; if(strlen($ev['location'])) $o .= '' . t('Location:') . '' . bbcode($ev['location']) . '
'; $o .= ''; return $o; } function sort_by_date($a) { usort($a,'ev_compare'); return $a; } function ev_compare($a,$b) { $date_a = (($a['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$a['start']) : $a['start']); $date_b = (($b['adjust']) ? datetime_convert('UTC',date_default_timezone_get(),$b['start']) : $b['start']); return strcmp($date_a,$date_b); }