resetting timezone to UTC temporarily so convert ics dates then changing back to...
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 12 Jul 2016 19:24:38 +0000 (15:24 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 12 Jul 2016 19:24:38 +0000 (15:24 -0400)
models/admin/management/events.php

index 21e4d37..0022277 100644 (file)
@@ -1615,15 +1615,17 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement
                     }
                     if(!empty($custom_times)){
                         $stamp = array();
-                        //date_default_timezone_set('UTC');
+                        date_default_timezone_set('UTC');
                         $serialized_custom_times = serialize($custom_times);
                         foreach($custom_times as $custom){
+                     
                             $convert = date('U',strtotime($custom));
                             $stamp[] = date('Y-m-d', $convert);
                         }
-                        $from_date = $to_date = $stamp[0];
+//                        $from_date = $to_date = $stamp[0];
                         $serialized_custom_times = serialize($stamp);
                     }
+                    date_default_timezone_set($curZone);
                 }
                                if ($recurring_event && $from_date == $to_date && empty( $custom_times ) ) {
                                        // Add two years to the recurring event if dates match
@@ -1638,6 +1640,7 @@ class GlmMembersAdmin_management_events extends GlmDataEventsManagement
                 if($start_time_only){
                     $etime = $btime;
                 }
+
                 // for the recurrences part
                 $recur_data = array(
                     'event'                => $event_id,