Forum Discussion

vannyconoza's avatar
vannyconoza
Copper Contributor
Nov 15, 2022

localTimezone missing from Activity in iOS

The localTimezone field is missing from Activity in Bot when using our bot/app in iOS.

Docs for reference:

https://learn.microsoft.com/en-us/javascript/api/botframework-schema/activity?view=botbuilder-ts-latest#botframework-schema-activity-localtimezone

Kindly advise if this is a bug or if not, where can we retrieve this information when missing?
Thanks.

9 Replies

  • vannyconoza's avatar
    vannyconoza
    Copper Contributor
    Just checked, not just on iOS. Both Android and iOS. Previously, it was present in Android.
    • Nivedipa-MSFT's avatar
      Nivedipa-MSFT
      Icon for Microsoft rankMicrosoft

      vannyconoza -
      We have tested this using below code and In android we are getting localtimezonevalue.

       

        protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
              {
                  var localetimezone = turnContext.Activity.Entities[0].Properties.ToString(); ;
                  var reply = MessageFactory.Text(localetimezone);
                  await turnContext.SendActivityAsync(reply, cancellationToken);
              }

       

       

      Ref Doc: Get context for your Microsoft Teams bot - Teams | Microsoft Learn

      Could you please share the code snippet which you are trying? Are you getting localtimezone in Teams web and desktop client?

      • vannyconoza's avatar
        vannyconoza
        Copper Contributor

        Nivedipa-MSFT The localTimezone is missing from 

        context received on TeamsActivityHandler.handleTeamsMessagingExtensionSubmitAction (submitAction invoke event: https://learn.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/action-commands/respond-to-task-module-submit?tabs=javascript%2Cdotnet-1#the-submitaction-invoke-event)

        The value is present when message extension is used in Desktop/Web Client, but is missing on mobile.

Resources