Php 如何在vcalendar中处理日光和标准时间之间的切换?

Php 如何在vcalendar中处理日光和标准时间之间的切换?,php,outlook,vcalendar,Php,Outlook,Vcalendar,生成的代码仅在当前时区(白天或标准时间)有效。当我将会议Outlook从标准时间发送到白天或从标准时间发送到白天时,Outlook会更正会议并将其向前移动1小时 Outlook按如下方式更正它: 此会议是根据您当前的时区自定义的。最初创建于这个时区:欧洲/布拉格 我发送会议-2020年5月6日:上午8-9点 但展望2020年5月6日上午9点至10点 Outlook或我的代码中是否存在问题? 谢谢你的帮助 这是php(7)中的脚本,用于从特定xml源收集数据。我需要将它们发送到outlook日历中

生成的代码仅在当前时区(白天或标准时间)有效。当我将会议Outlook从标准时间发送到白天或从标准时间发送到白天时,Outlook会更正会议并将其向前移动1小时

Outlook按如下方式更正它: 此会议是根据您当前的时区自定义的。最初创建于这个时区:欧洲/布拉格

我发送会议-2020年5月6日:上午8-9点 但展望2020年5月6日上午9点至10点

Outlook或我的代码中是否存在问题? 谢谢你的帮助

这是php(7)中的脚本,用于从特定xml源收集数据。我需要将它们发送到outlook日历中。我们正在使用outlook 2016和365

    function setICalendar(){
  $this->strICalendarClass="\nBEGIN:VCALENDAR\nMETHOD:REQUEST";
  $this->strICalendarClass.="\nBEGIN:VTIMEZONE\nTZID:Europe/Prague";
  $this->strICalendarClass.="\nX-LIC-LOCATION:Europe/Prague";
  $this->strICalendarClass.="\nBEGIN:STANDARD";
  $this->strICalendarClass.="\nDTSTART:19411001T000000";
  $this->strICalendarClass.="\nTZOFFSETFROM:0000\nTZOFFSETTO:0000\nTZNAME:Standard Time";
  $this->strICalendarClass.="\nRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10";
  $this->strICalendarClass.="\nCET";
  $this->strICalendarClass.="\nEND:STANDARD";
  $this->strICalendarClass.="\nBEGIN:DAYLIGHT";
  $this->strICalendarClass.="\nDTSTART:19860504T000000";
  $this->strICalendarClass.="\nTZOFFSETFROM:-0200\nTZOFFSETTO:-0100\nTZNAME:Daylight Savings Time";
  $this->strICalendarClass.="\nRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3";
  $this->strICalendarClass.="\nCEST";
  $this->strICalendarClass.="\nEND:DAYLIGHT\nEND:VTIMEZONE";
  $this->strVEvent="\nBEGIN:VEVENT";

nBEGIN:VCALENDAR
METHOD:REQUEST;
BEGIN:VTIMEZONE
TZID:Europe/Prague;
X-LIC-LOCATION:Europe/Prague;
BEGIN:STANDARD";
DTSTART:19411001T000000;
TZOFFSETFROM:0000
TZOFFSETTO:0000
TZNAME:Standard Time;
RULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10;
CET;
END:STANDARD;
BEGIN:DAYLIGHT;
DTSTART:19860504T000000;
TZOFFSETFROM:-0200
TZOFFSETTO:-0100
TZNAME:Daylight Savings Time;
RULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3;
CEST;
END:DAYLIGHT;
END:VTIMEZONE;

我希望在开始阶段和展望阶段都能有同样的时间。

我修复了它,就像这样,一切都正常

$this->strICalendarClass="\nBEGIN:VCALENDAR\nMETHOD:REQUEST";
  $this->strICalendarClass.="\nBEGIN:VTIMEZONE\nTZID:Europe/Prague";
  $this->strICalendarClass.="X-LIC-LOCATION:Europe/Prague";
  $this->strICalendarClass.="\nBEGIN:STANDARD";
  $this->strICalendarClass.="\nDTSTART:19411001T000000";
  $this->strICalendarClass.="\nTZOFFSETFROM:-0100\nTZOFFSETTO:0000\nTZNAME:Standard Time";
  $this->strICalendarClass.="\nRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10";
  $this->strICalendarClass.="\nCET";
  $this->strICalendarClass.="\nEND:STANDARD";
  $this->strICalendarClass.="\nBEGIN:DAYLIGHT";
  $this->strICalendarClass.="\nDTSTART:20140330T030000";
  $this->strICalendarClass.="\nTZOFFSETFROM:0000\nTZOFFSETTO:+0100\nTZNAME:Daylight Savings Time";
  $this->strICalendarClass.="\nRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3";
  $this->strICalendarClass.="\nCEST";
  $this->strICalendarClass.="\nEND:DAYLIGHT\nEND:VTIMEZONE";