导出到iCal - DST问题

时间:2012-04-20 13:37:01

标签: php icalendar dst

我正在使用iCalcreator类导出到iCal。这一切都运行良好,但我在CMS中设置的时间显示为一小时后导入iCal。所以我试图弄清楚如何正确地允许检测夏令时。任何人都可以看到这应该设置在哪里/如何设置?这是我的代码:

$v = new vcalendar($config);                            

        $v->setProperty("method", "PUBLISH");                    
        $v->setProperty("x-wr-calname", "My Cal");      
        $v->setProperty("X-WR-CALDESC", "Events Calendar"); 
        $tz = "Europe/London";
        $v->setProperty("X-WR-TIMEZONE", $tz);  
        iCalUtilityFunctions::createTimezone($v, $tz);           

        // Get events
        $events = Model_Event::list_by_filter($this->filters);

        foreach ($events as $e)
        {
            // Create an event calendar component
            $vevent = & $v->newComponent("vevent");  
            $vevent->setProperty("dtstart", date('Ymd\THis', $e->start_date));
            $vevent->setProperty("dtend", date('Ymd\THis', $e->end_date));
            $vevent->setProperty("summary", $e->title);
            $vevent->setProperty("description", strip_tags($e->content));
        }

        $v->returnCalendar();

0 个答案:

没有答案