$geventid = $_REQUEST["geventid"]; $typeid = $_REQUEST["typeid"]; error_reporting(0); $GoogleSync4You = new GoogleSync4You(); $GoogleSync4You->setAccessDataForUser($userid); $GoogleSync4You->connectToGoogle(); if ($GoogleSync4You->isLogged()) { $add_into_vtiger = true; $c_time_zone = new DateTimeZone($current_user->time_zone); if ($current_user->hour_format == '') { $format = 'am/pm'; } else { $format = $current_user->hour_format; } $c_mod_strings = return_specified_module_language($current_language, "Calendar"); $event = $GoogleSync4You->getGoogleCalEvent($geventid); $recurrence = $event->recurrence; if ($recurrence != "") { $add_into_vtiger = false; $Lines = explode("<br />", nl2br($recurrence)); foreach ($Lines as $line) { $isdate = false; $LA = explode(":", $line); $convert = trim($LA[0]); if (substr($convert, 0, 2) == "DT") { list($n, $timezone) = explode("=", $convert); $is_full_day_event = false; } if ($timezone != "") { if (substr($convert, 0, 7) == "DTSTART") { $startdatetime = new DateTime($LA[1], new DateTimeZone($timezone));