Search code examples
botframeworkmicrosoft-graph-apimicrosoft-teams

Microsoft Teams: get timezone of user?


I'm developing a bot for MS Teams and I'm looking to know the timezone of a user, to deliver messages at an appropriate time (e.g. not in the middle of the night).

I didn't found something appropriate in the bot framework REST API. Although messages we receive include a 'clientInfo.country' property, which is a start, but definitely not enough to time messages as we would like.


Solution

  • And the answer is: there’s a localTimestamp property that can be used to get the time offset, which is good enough for what I need.