$v = new vCalendar(); $v->setConfig('filename', 'icagenda.ics'); $v->prodid = 'iCagenda'; $config = JFactory::getConfig(); // Joomla 3.x / 2.5 SWITCH if (version_compare(JVERSION, '3.0', 'ge')) { $offset = $config->get('offset'); } else { $offset = $config->getValue('config.offset'); } $dateTimeZone = new DateTimeZone($offset); $dateTime = new DateTime("now", $dateTimeZone); $timeOffset = $dateTimeZone->getOffset($dateTime); $timezone = $timeOffset / 3600; $tz = 'UTC'; $v->setProperty('method', 'PUBLISH'); $v->setProperty('X-WR-CALDESC', ''); $v->setProperty('X-WR-TIMEZONE', $tz); $xprops = array('X-LIC-LOCATION' => $tz); if (version_compare(PHP_VERSION, '5.3.0') >= 0) { iCalUtilityFunctions::createTimezone($v, $tz, $xprops); } $stamp = $this->data; $get_date = ''; $href = '#'; $start_Datetime = ''; $start_Date = ''; $end_Datetime = ''; $end_Date = ''; foreach ($stamp->items as $item) { $s_dates = $item->dates;