예제 #1
0
 * @copyright   Copyright (c)2012-2015 Cyril Rezé, Jooml!C - All rights reserved
 *
 * @license     GNU General Public License version 3 or later; see LICENSE.txt
 * @author      Tom-Henning (MaW) / Cyril Rezé (Lyr!C)
 * @link        http://www.joomlic.com
 *
 * @version     3.5.6 2015-05-11
 * @since       3.2.9
 *------------------------------------------------------------------------------
*/
// No direct access to this file
defined('_JEXEC') or die;
require_once JPATH_COMPONENT . '/helpers/iCalcreator.class.php';
//$v = new vCalendar($config);
$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', '');