Update the time output.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 21 Apr 2017 19:04:38 +0000 (15:04 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 24 Apr 2017 15:59:24 +0000 (11:59 -0400)
Need to bring in the correct time output. Using the detail event page
and how it is outputting the event times.

models/front/events/list.php
views/front/events/detail.html

index 2dae45c..50ba325 100644 (file)
@@ -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}";
index 5180e90..ff9e54e 100644 (file)
@@ -63,7 +63,7 @@
                                     <div>
                                     <span>
                                     {if !$event.all_day}
-        
+
                                         <strong>
                                             {if $rec.start_time.time == $rec.end_time.time || $rec.start_time_only.value}
                                                 {$rec.start_time.time|strtotime|date_format:"%l:%M %P"}