0

我正在尝试为英国的 Outlook 事件设置正确的时间,但 Outlook 似乎为 BST(英国夏令时)设置了错误的时间。

这是一个链接,它在 2017 年 6 月 19 日下午 1254 到 1257 之间创建了一个活动。

在我的 Outlook 中,它提前一个小时打开,即下午 1354 点。有没有办法在链接中明确设置时区?

我已尝试检查我的设置并使用不同的 Outlook 帐户,因此我认为这不是我的邮件/日历设置的问题。

https://bay02.calendar.live.com/calendar/calendar.aspx?rru=addevent&dtstart=20170619T125400&dtend=20170619T125700&summary=Summary+of+the+event&location=Location+of+the+event&description=example+text.&allday=false&uid=

4

1 回答 1

0

经过一番研究后,我意识到 Outlook 在发送链接时总是以 UTC 表示时间。因此,您需要将日期/时间从 BST 转换为 UTC。您可以使用 PHP 执行此操作,如下所示:

$date = new DateTime('2017-06-22T12:54', new 
DateTimeZone('Europe/London')); /* <-- Time zone to be converted */

echo $date->format('YmdHis') . "\n";$date->setTimezone(new 
DateTimeZone('UTC'));echo $date->format('YmdHis') . "\n"; /* <-- New time zone, UTC */
于 2017-04-29T09:19:33.527 回答