I do not reproduce this behavior with a user in the Pacific Standard Time time zone OR the GMT Standard Time time zone. For clarity, I'm doing all tests with Postman, and I did not use the Prefer: outlook.timezone
header Jeremy pointed out above.
I created a daily, no end appointment for the user at 2PM Pacific, which is 22:00 UTC. Also note that DST starts in this time zone on March 10. As you can see below, the times are correct on the instances both before and after the update.
I also repeated this same sequence of events for a user in the GMT Standard Time time zone (configured like so in Outlook on the web):
I got the exact same results for this user.
I would suggest that when you patch the recurrence you always use the recurrenceTimeZone
from the original recurrence. You may have corrupted the recurrence by patching with UTC
originally.
Get event after create in Outlook on the web
GET /me/events/{id}&$select=originalStartTimeZone,originalEndTimeZone,start,end,recurrence
{
"id": "AAMkAGE1NWM...",
"originalStartTimeZone": "Pacific Standard Time",
"originalEndTimeZone": "Pacific Standard Time",
"start": {
"dateTime": "2019-01-24T22:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-01-24T22:30:00.0000000",
"timeZone": "UTC"
},
"recurrence": {
"pattern": {
"type": "daily",
"interval": 1,
"month": 0,
"dayOfMonth": 0,
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "noEnd",
"startDate": "2019-01-24",
"endDate": "0001-01-01",
"recurrenceTimeZone": "Pacific Standard Time",
"numberOfOccurrences": 0
}
}
}
Get instances before modifying
Notice the shift in start/end times.
GET /me/events/{id}/instances?startDateTime=2019-03-09T00:00:00&endDateTime=2019-03-11T00:00:00&
$select=originalStartTimeZone,originalEndTimeZone,start,end
{
"value": [
{
"id": "AAMkAGE1NWM...",
"originalStartTimeZone": "Pacific Standard Time",
"originalEndTimeZone": "Pacific Standard Time",
"start": {
"dateTime": "2019-03-09T22:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-03-09T22:30:00.0000000",
"timeZone": "UTC"
}
},
{
"@odata.etag": "W/\"bReRxUIs3kGIyXXcVJg69AAANf7nZQ==\"",
"id": "AAMkAGE1NWM...",
"originalStartTimeZone": "Pacific Standard Time",
"originalEndTimeZone": "Pacific Standard Time",
"start": {
"dateTime": "2019-03-10T21:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-03-10T21:30:00.0000000",
"timeZone": "UTC"
}
}
]
}
Update event recurrence to add end date
Notice that I left recurrenceTimeZone
as the same value as the original.
PATCH /me/events/{id}
{
"recurrence": {
"pattern": {
"type": "daily",
"interval": 1,
"month": 0,
"dayOfMonth": 0,
"firstDayOfWeek": "sunday",
"index": "first"
},
"range": {
"type": "endDate",
"startDate": "2019-01-24",
"endDate": "2020-01-23",
"recurrenceTimeZone": "Pacific Standard Time",
"numberOfOccurrences": 0
}
}
}
Get instances after modification
Notice that the start/end times are still shifted correctly.
GET /me/events/{id}/instances?startDateTime=2019-03-09T00:00:00&endDateTime=2019-03-11T00:00:00&
$select=originalStartTimeZone,originalEndTimeZone,start,end
{
"value": [
{
"id": "AAMkAGE1NWM...",
"originalStartTimeZone": "Pacific Standard Time",
"originalEndTimeZone": "Pacific Standard Time",
"start": {
"dateTime": "2019-03-09T22:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-03-09T22:30:00.0000000",
"timeZone": "UTC"
}
},
{
"@odata.etag": "W/\"bReRxUIs3kGIyXXcVJg69AAANf7nZQ==\"",
"id": "AAMkAGE1NWM...",
"originalStartTimeZone": "Pacific Standard Time",
"originalEndTimeZone": "Pacific Standard Time",
"start": {
"dateTime": "2019-03-10T21:00:00.0000000",
"timeZone": "UTC"
},
"end": {
"dateTime": "2019-03-10T21:30:00.0000000",
"timeZone": "UTC"
}
}
]
}
recurrence
)? – Jason Johnston