Commit f6f09e20 authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-2562: Fixing repeating events showing correct time and timezone

parent 44e4cbac
......@@ -69,7 +69,7 @@ function uw_ct_event_preprocess_node(&$vars) {
if (count($wrapper->field_event_date->value()) > 1 || count($wrapper->field_event_date->value()) == 0) {
// Display settings for the field_event_date.
$display = array('settings' => array('format_type' => 'long'), 'label' => 'hidden');
$display = array('settings' => array('format_type' => 'hours_change_format'), 'label' => 'hidden');
// Replace the two date values from the view results
// into the 0th element of field_event_date.
......@@ -82,7 +82,7 @@ function uw_ct_event_preprocess_node(&$vars) {
$field_event_date = field_get_items('node', $node, 'field_event_date');
// Set the new output from the re-occured dates.
$vars['content']['output'] = field_view_value('node', $node, $field_name, $field_event_date[0], $display);
$vars['content']['output'] = field_view_value('node', $node, $field_name, $field_event_date[$vars['id'] - 1], $display);
// Drop the re-occuring rule if it is present.
$vars['content']['output']['#markup'] = preg_replace('/\<div class=\"date-repeat-rule\"\>(.*?)\<\/div\>/', '', $vars['content']['output']['#markup']);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment