From: Steve Sutton Date: Fri, 21 Apr 2017 19:04:38 +0000 (-0400) Subject: Update the time output. X-Git-Tag: v1.6.36^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=3a393493458fe38e8bba666641a14f3ac69f3685;p=WP-Plugins%2Fglm-member-db-events.git Update the time output. Need to bring in the correct time output. Using the detail event page and how it is outputting the event times. --- diff --git a/models/front/events/list.php b/models/front/events/list.php index 2dae45c..50ba325 100644 --- a/models/front/events/list.php +++ b/models/front/events/list.php @@ -419,8 +419,9 @@ class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction } $eventDates .= $this->getEventDate( $rec['from_date']['timestamp'], $rec['to_date']['timestamp'], 'timestamp', false ); if ( !$event['all_day'] ) { - $startTime = strftime( "%l:%M %p", $rec['start_time']['time'] ); - if ( $startTime == $endTime || $rec['start_time_only'] ) { + $startTime = strftime( "%l:%M %p", strtotime( $rec['start_time']['time'] ) ); + $endTime = strftime( "%l:%M %p", strtotime( $rec['end_time']['time'] ) ); + if ( $startTime == $endTime || $rec['start_time_only']['value'] ) { $eventDates .= " {$startTime}"; } else { $eventDates .= " {$startTime} - {$endTime}"; diff --git a/views/front/events/detail.html b/views/front/events/detail.html index 5180e90..ff9e54e 100644 --- a/views/front/events/detail.html +++ b/views/front/events/detail.html @@ -63,7 +63,7 @@
{if !$event.all_day} - + {if $rec.start_time.time == $rec.end_time.time || $rec.start_time_only.value} {$rec.start_time.time|strtotime|date_format:"%l:%M %P"}