首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Recurrence.Range.StartDate / EndDate包含时区偏移量

Recurrence.Range.StartDate / EndDate包含时区偏移量
EN

Stack Overflow用户
提问于 2015-05-14 14:32:32
回答 1查看 272关注 0票数 1

递归规则日期包含时区偏移,其中日历事件"Start“/ "End”字段位于UTC,这似乎是不正确的行为(Bug?)。有人知道为什么"Recurrence.Range“"StartDate”/ "EndDate“字段包含非UTC的日期吗?预期行为是接收日历事件对象中所有日期字段的UTC日期。

代码语言:javascript
复制
{
    "@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重复规则)之间的集成,并且不知道如何在重复的“范围”对象中正确地解释上述日期。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-26 15:20:34

这似乎是API中的一个bug。我们有一个工作项来调查和修复它,但是我没有任何时间框架可以共享。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30240016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档