not sure if this is supposed to be in event views or here, but i've got a problem with the upcoming events block, which i've configured as such to display the date of an upcoming event, rather than the time left; however, as i am in new zealand (+1300 hours) the timezone seems to be a point of contention - events that start before 1pm (i.e. the 13th hour of the day) are noted as starting on the previous day on the main page. All details on the events themselves are fine, i just don't know how to configure the block output to take the timezone in to account in the date display.

/**
 * Format an individual upcoming event block item
 *
 * @param node
 *   The node to render as an upcoming event
 */
function theme_event_upcoming_item($node) {
  $output = l($node->title, "node/$node->nid", array('title' => $node->title));
//  if ((event_get_types('all') + event_get_types('solo')) > 1) {
//    $output .= '<span class="event-nodetype">'. t("($node->typename)") .'</span>';
//  }
  $output .= '<span class="event-timeleft">('. gmdate('D, F j, Y', $node->event_start) .')</span>';
  return $output;
}

Comments

fraew’s picture

got it to work with the following code (thanks to another issue about displaying the date; just revised my own code to a similar format). Still, i'd love to know how to group by the timezoned date

function theme_event_upcoming_item($node) {
  $output = l($node->title, "node/$node->nid", array('title' => $node->title));
  if ((event_get_types('all') + event_get_types('solo')) > 1) 
   $output .= '<span class="event-timeleft">on '. format_date($node->event_start, 'custom', 'j/m - G:i') .'</span>';
  return $output;
}
simon georges’s picture

Status: Active » Closed (won't fix)

This version of Event is not supported anymore. The issue is closed for this reason.

Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.