Recurrence.Range.StartDate/EndDate包含时区偏移量 [英] Recurrence.Range.StartDate / EndDate contain timezone offset

查看:77
本文介绍了Recurrence.Range.StartDate/EndDate包含时区偏移量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重复规则日期包含时区偏移量,其中日历事件开始"/结束"字段位于UTC中,这似乎是不正确的行为(错误?).有谁知道为什么"Recurrence.Range""StartDate"/"EndDate"字段包含非UTC的日期?预期的行为是接收日历事件对象中所有日期字段的UTC日期.

Recurrence rule dates contain timezone offset where the calendar event "Start" / "End" fields are in UTC which seems incorrect behavior (Bug?). Did anyone knows why the "Recurrence.Range" "StartDate" / "EndDate" fields contains dates which are not UTC? Expected behavior is to receive UTC dates for all date fields in the calendar event object.

{
    "@odata.id": "https://outlook.office365.com/api/v1.0/Users('EXAMPLEUSER')",
    "@odata.etag": "ETAG",
    "Id": "EXAMPLEID",
    "ChangeKey": "GnglO5JwUUGYx+QpS/Qc5AAABbYSpQ==",
    "Categories": [],
    "DateTimeCreated": "2015-05-14T13:52:41.9129608Z",
    "DateTimeLastModified": "2015-05-14T13:52:41.9285866Z",
    "Subject": "Every monday",
    "BodyPreview": "adsasdsa",
    "Body": {
        "ContentType": "HTML",
        "Content": "adsasdsa"
    },
    "Importance": "Normal",
    "HasAttachments": false,
    //Notice the format of the date - correctly comes in UTC:
    "Start": "2015-05-11T00:00:00Z",
    "StartTimeZone": "UTC",
    //Notice the format of the date - correctly comes in UTC:
    "End": "2015-05-12T00:00:00Z",
    "EndTimeZone": "UTC",
    "Reminder": null,
    "Location": {
        "DisplayName": "",
        "Address": {
            "Street": "",
            "City": "",
            "State": "",
            "CountryOrRegion": "",
            "PostalCode": ""
        },
        "Coordinates": {
            "Accuracy": "NaN",
            "Altitude": "NaN",
            "AltitudeAccuracy": "NaN",
            "Latitude": "NaN",
            "Longitude": "NaN"
        }
    },
    "ResponseStatus": {
        "Response": "Organizer",
        "Time": "0001-01-01T00:00:00Z"
    },
    "ShowAs": "Free",
    "IsAllDay": true,
    "IsCancelled": false,
    "IsOrganizer": true,
    "ResponseRequested": true,
    "Type": "SeriesMaster",
    "SeriesMasterId": null,
    "Attendees": [],
    "Recurrence": {
        "Pattern": {
            "Type": "Weekly",
            "Interval": 1,
            "Month": 0,
            "Index": "First",
            "FirstDayOfWeek": "Sunday",
            "DayOfMonth": 0,
            "DaysOfWeek": ["Monday"]
        },
        "Range": {
            "Type": "NoEnd",
            //Notice the format of the date - it's not UTC:
            "StartDate": "2015-05-11T00:00:00+03:00",
            "EndDate": "0001-01-01T00:00:00Z",
            "NumberOfOccurrences": 0
        }
    },
    "Organizer": {
        "EmailAddress": {
            "Address": "vladimir@kendouischeduler.tk",
            "Name": "vladimir iliev"
        }
    },
    "iCalUId": "EXAMPLEICALUID",
    "WebLink": "EXAMPLEWEBLINK"
}

我目前正在从事Office365日历事件与第三方客户端Scheduler小部件(仅支持iCal重复规则)之间的集成,并且不知道如何正确地解释重复范围"对象中的上述日期.

I'm currently working on integration between Office365 calendar events and third-party client-side Scheduler widgets (which supports only iCal recurrence rule) and doesn't know how to interpret correctly the above dates in recurrence "Range" object.

推荐答案

这似乎是API中的错误.我们有一个工作项目需要调查和修复,但我没有任何时间表可以分享.

This appears to be a bug in the API. We have a work item to investigate and fix it, but I don't have any timeframes to share.

这篇关于Recurrence.Range.StartDate/EndDate包含时区偏移量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆