G'day community,
I'm hoping someone might have some ideas on this one.
I've been trying to pull through all shifts (from MS Teams Shifts app) through Automate into a SharePoint list. For the most part this works, however I'm unable to accurately filter based on the day I want to pull due to the fact that Automate is pulling shifts on a different time zone instead of the predetermined (in Shifts app) UTC+10:00 time zone. I can see this with the JSON output, for example the below shift actually starts at 8am on the 30/10/2020:
"sharedShift": {
"displayName": "In Office",
"notes": "REDACTED",
"startDateTime": "2020-10-29T22:00:00Z",
"endDateTime": "2020-10-30T07:00:00Z",
"theme": "yellow",
"activities": []
}
I'm getting close to throwing my laptop, so if anyone has ANY ideas where to look on this one would be definately appreciated.
Cheers all.
Hi @Anonymous
The timestamp is being retrieved in the UTC time zone (based on the Z in the JSON output). Note that, while writing data to a “DateTime” type column in SharePoint, the data will be taken as UTC (SharePoint assumes it is UTC even if you send a time zone formatted date) and converted to the time zone set on the regional settings of the SharePoint site. To address this issue, either change the SharePoint Site regional settings to UTC and send data from Flow according to your time zone or else send data from Flow in UTC and change the regional settings in SharePoint site to your region.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Thanks for replying, unfortunately it's the pull of data from the Shifts app than anything else instead of the push to SharePoint.
For example this is the output data from Shifts as seen by Automate:
},
"sharedShift": {
"displayName": "In Office",
"startDateTime": "2020-11-02T22:30:00Z",
"endDateTime": "2020-11-03T06:30:00Z",
"theme": "blue",
"activities": []
}
When in the shift times are the below (in the Shifts App):
"startDateTime": "2020-11-02T08:00:00Z",
"endDateTime": "2020-11-02T16:30:00Z",
The Team, Shift Schedule, users and SPO site are all set to the correct timezone (utc+10)
Were you able to figure this out? I've been playing with the "Convert Time Zone" but my hours are still off. The SharePoint site is set to Eastern as well.
User | Count |
---|---|
16 | |
16 | |
14 | |
9 | |
8 |
User | Count |
---|---|
27 | |
26 | |
24 | |
23 | |
14 |