Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 619
Savageman Avatar asked Sep 04 '25 02:09

Savageman


1 Answers

On every message to a user, there is an entities[] collection, one of which is details of the user's locale. For example (copied/pasted from here):

"entities": [
  { 
    "locale": "en-US",
    "country": "US",
    "platform": "Windows",
    "timezone": "America/Los_Angeles",
    "type": "clientInfo"
  }
],
like image 110
Bill Bliss - MSFT Avatar answered Sep 07 '25 17:09

Bill Bliss - MSFT