Microsoft Teams: get timezone of user?










0















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.










share|improve this question




























    0















    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.










    share|improve this question


























      0












      0








      0








      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.










      share|improve this question
















      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.







      botframework microsoft-graph microsoft-teams






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 16 '18 at 19:22









      Zoe

      11.8k74479




      11.8k74479










      asked Nov 13 '18 at 13:44









      SavagemanSavageman

      5,30133046




      5,30133046






















          2 Answers
          2






          active

          oldest

          votes


















          1














          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"

          ],





          share|improve this answer

























          • I do receive locale/country/platform/type, but I do NOT receive timezone...

            – Savageman
            Nov 13 '18 at 22:17











          • Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

            – Bill Bliss - MSFT
            Nov 14 '18 at 0:56











          • It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

            – Savageman
            Nov 14 '18 at 11:10











          • Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

            – Zoe
            Nov 16 '18 at 19:22











          • We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

            – Wajeed - MSFT
            Nov 20 '18 at 7:17


















          0














          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.






          share|improve this answer






















            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282405%2fmicrosoft-teams-get-timezone-of-user%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            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"

            ],





            share|improve this answer

























            • I do receive locale/country/platform/type, but I do NOT receive timezone...

              – Savageman
              Nov 13 '18 at 22:17











            • Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

              – Bill Bliss - MSFT
              Nov 14 '18 at 0:56











            • It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

              – Savageman
              Nov 14 '18 at 11:10











            • Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

              – Zoe
              Nov 16 '18 at 19:22











            • We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

              – Wajeed - MSFT
              Nov 20 '18 at 7:17















            1














            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"

            ],





            share|improve this answer

























            • I do receive locale/country/platform/type, but I do NOT receive timezone...

              – Savageman
              Nov 13 '18 at 22:17











            • Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

              – Bill Bliss - MSFT
              Nov 14 '18 at 0:56











            • It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

              – Savageman
              Nov 14 '18 at 11:10











            • Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

              – Zoe
              Nov 16 '18 at 19:22











            • We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

              – Wajeed - MSFT
              Nov 20 '18 at 7:17













            1












            1








            1







            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"

            ],





            share|improve this answer















            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"

            ],






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 16 '18 at 19:21









            Zoe

            11.8k74479




            11.8k74479










            answered Nov 13 '18 at 17:39









            Bill Bliss - MSFTBill Bliss - MSFT

            2,2161712




            2,2161712












            • I do receive locale/country/platform/type, but I do NOT receive timezone...

              – Savageman
              Nov 13 '18 at 22:17











            • Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

              – Bill Bliss - MSFT
              Nov 14 '18 at 0:56











            • It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

              – Savageman
              Nov 14 '18 at 11:10











            • Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

              – Zoe
              Nov 16 '18 at 19:22











            • We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

              – Wajeed - MSFT
              Nov 20 '18 at 7:17

















            • I do receive locale/country/platform/type, but I do NOT receive timezone...

              – Savageman
              Nov 13 '18 at 22:17











            • Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

              – Bill Bliss - MSFT
              Nov 14 '18 at 0:56











            • It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

              – Savageman
              Nov 14 '18 at 11:10











            • Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

              – Zoe
              Nov 16 '18 at 19:22











            • We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

              – Wajeed - MSFT
              Nov 20 '18 at 7:17
















            I do receive locale/country/platform/type, but I do NOT receive timezone...

            – Savageman
            Nov 13 '18 at 22:17





            I do receive locale/country/platform/type, but I do NOT receive timezone...

            – Savageman
            Nov 13 '18 at 22:17













            Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

            – Bill Bliss - MSFT
            Nov 14 '18 at 0:56





            Can you describe more? How you are receiving the message (or equivalently what you are doing on the client to send it) and from what client?

            – Bill Bliss - MSFT
            Nov 14 '18 at 0:56













            It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

            – Savageman
            Nov 14 '18 at 11:10





            It's an app published on the Office store. I am receiving the messages from the webhook. I'm not sending messages myself, I'm receiving them from people who installed the bot. Here's one example of data I receive (without timezone): "entities":["locale":"nb-NO","country":"NO","platform":"iOS","type":"clientInfo"] Here's another one: "entities":["locale":"de-DE","country":"DE","platform":"Windows","type":" clientInfo"] I checked a few of them, and none include the timezone property.

            – Savageman
            Nov 14 '18 at 11:10













            Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

            – Zoe
            Nov 16 '18 at 19:22





            Meta: Stack Overflow doesn't use three backticks for code blocks. Use at least four spaces in front of the code (and a newline before the block) instead.

            – Zoe
            Nov 16 '18 at 19:22













            We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

            – Wajeed - MSFT
            Nov 20 '18 at 7:17





            We are looking into this issue. For now, you can also use offset of localTimestamp and timestamp values.

            – Wajeed - MSFT
            Nov 20 '18 at 7:17













            0














            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.






            share|improve this answer



























              0














              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.






              share|improve this answer

























                0












                0








                0







                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.






                share|improve this answer













                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.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 20 '18 at 13:26









                SavagemanSavageman

                5,30133046




                5,30133046



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53282405%2fmicrosoft-teams-get-timezone-of-user%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Use pre created SQLite database for Android project in kotlin

                    Darth Vader #20

                    Ondo