【问题标题】:Office365 api issue with timezoneOffice365 api 时区问题
【发布时间】:2019-08-22 06:42:44
【问题描述】:

我们使用 php sdk (https://github.com/microsoftgraph/msgraph-sdk-php) 创建日历事件

…..
                'start' => [
                    'dateTime' =>'2019-04-02T12:30:00+01:00',
                    'timeZone' => 'Europe/London'
                ],
                'end' => [
                    'dateTime' => '2019-04-02T13:30:00+01:00',
                    'timeZone' => 'Europe/London'
                ],
….

但是当我们在桌面时区打开约会时,总是显示 UTC。为什么 ?以及如何解决?

Outlook screenshot

【问题讨论】:

  • 这类时间格式称为iso时间格式,可以转换为本地时间戳

标签: php calendar timezone office365


【解决方案1】:

我相信您将需要发送这些值没有时区偏移。换句话说,dateTime 应该是这样的:'2019-04-02T12:30:00'

此外,虽然文档声明支持 IANA 和 Windows 时区,但 at least one other person has reported it not working with IANA zones。如果确实如此,那么等效的 Windows 时区 ID 将是 'GMT Standard Time'。希望它确实支持,但您可以尝试。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-01
    • 2017-12-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多