Updating ical feed
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 28 Jul 2017 13:22:36 +0000 (09:22 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 28 Jul 2017 13:22:36 +0000 (09:22 -0400)
Use utc time for the create and dstamp times.
update organizer to use trim.

index.php
models/front/events/icalFeed.php

index d4187f6..9522bc1 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Events
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.6.55
+ * Version: 1.6.56
  * Author: Chuck Scott
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -20,7 +20,7 @@
  * @package glmMembersDatabaseEventsAddOn
  * @author Chuck Scott <cscott@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.6.55
+ * @version 1.6.56
  */
 
 /*
@@ -38,7 +38,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.55');
+define('GLM_MEMBERS_EVENTS_PLUGIN_VERSION', '1.6.56');
 define('GLM_MEMBERS_EVENTS_PLUGIN_DB_VERSION', '0.1.2');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.
index 2f9d909..7d12262 100644 (file)
@@ -125,8 +125,8 @@ EOD;
         $eventTemplateStart = <<<EOD
 \r\nBEGIN:VEVENT
 UID:%d@%s%s
-CREATED;TZID=America/Detroit:%s
-DTSTAMP;TZID=America/Detroit:%s
+CREATED:%sZ
+DTSTAMP:%sZ
 DTSTART;TZID=America/Detroit:%s
 DTEND;TZID=America/Detroit:%s
 %s
@@ -173,7 +173,7 @@ EOD;
         }
         // ORGANIZER part
         $organizer = str_replace( '"', '', $event['contact_name'] );
-        $organizerCN = ( $organizer ) ? "\n" . 'ORGANIZER;CN="' . $organizer .  '" :' : '';
+        $organizerCN = ( trim( $organizer ) ) ? "\n" . 'ORGANIZER;CN="' . trim( $organizer ) .  '" :' : '';
         $eventDataStart = sprintf($eventTemplateStart,
             $event['id'],
             $urlHost,