Is your feature request related to a problem? Please describe.
The activity interface already includes the user's local timestamp, so the user's timezone offset is known. But this is not precise enough when trying to calculate past or future dates for this user in UTC (e.g. when user is entering a date & time). Example: User is in UTC-06:00, uses locale en-US and enters a future/past date & time in an Adaptive card. It's currently not possible to know whether to correct for DST (Daylight Savings Time) when calculating the UTC date or not. If the user is in North America, DST needs to be observed, if they are in Latin America (same tz offset), DST needs to be ignored.
Describe the solution you'd like
Fetch the IANA time zone string from the user's device and pass it in the activity interface.
Describe alternatives you've considered
Using the locale it is possible to make an educated guess, but many users that are not based in the US have their locale set to en-US which makes this approach very error prone.
[enhancement]
Hi @matthiasdilger, we will evaluate taking this in our R10 milestone, which wraps up around end-of-summer. For now, I've triaged this issue, and once we have a plan in R10 I'll update this issue.
Note: I'm moving this to the "botframework-sdk" repo, as it's really a design change that impacts all of our codebase.
fwiw, it seems someone already had the right idea https://github.com/microsoft/botframework-sdk/blob/master/specs/botframework-activity/botframework-activity.md#local-timezone
Hi, I noticed that some Teams clients do seem to send the time zone
entities: [
{
locale: 'en-IN',
country: 'IN',
platform: 'Windows',
timezone: 'Asia/Calcutta',
type: 'clientInfo'
}
]
Is there a developer preview that already sends this information?
@clearab I believe on the Bot Framework side, this is all done. From what @matthiasdilger indiciates, this may still need some work on the Teams side. Can you chase this down?
It doesn't look like this is enabled in production for all clients yet, the Teams group is investigating. I'll follow up when more information is available.
@clearab Hi, has there been any progress on this? Would be nice to get this feature before autumn, when DST ends for many countries. Thanks!
The work has been completed for this, but the validation and rollout is pending. Will get back when we have an ETA for WW deployment.
We have a normalized field in the protocol, localTimezone, that's designed for this purpose. Is that field not suitable?
Edit: even I'm in the habit of typing timestamp when I really mean timezone. We added support for timezones about two years ago
@tacri Do you have an ETA on completion?
No ETA, this is still in progress.
@clearab For an appropriate response we need an idea of when this will be addressed. Should we assume this on the unprioritized backlog?
The work isn't on the Bot Framework team to complete. The Teams team is currently working on fixing and deploying this.
ETA for global rollout across all clients is Q4 2020.
Q4 is here - keeping my fingers crossed 馃
@matthiasdilger I've reached out to Teams to see if they are still on track for the previously mentioned ETAs. Either a Teams member or I will provide an update ASAP.
The ETA is still Q4 2020.
Hi @stevengum thanks for the update. It would be really great to have this field in the activity interface, would enable date calculations for all kinds of bot interactions via Teams.
Seems that Teams' Android client is sending the time zone now 馃帀 Great to see the progress
entities: [
{
locale: 'en-US',
country: 'US',
platform: 'Android',
timezone: 'America/New_York',
type: 'clientInfo'
}
]
Hi @matthiasdilger: there is a top level field on the Activity object named localTimezone which will include the IANA timezone name for the client. We are working on getting this field set for all of the various Teams clients. The timeline for this may go into next year, so in the meantime, you can use the timzone names that are also communicated in the entities field in Teams.
Hi @Jeffders, thanks for the update. Does this mean that other Teams client platforms apart from Android (iOS, web, Windows, Mac) will also send the timezone name in the entities field soon or will those platforms only implement the top level localTimezone field later?
Yes, including local timezone information in the top-level field will not change the rollout for the timezone field in the entities array. All Teams clients are still planning on sending that information this quarter. Including it in the top-level field will help ensure parity across all channels.
We're tracking towards complete support across all clients by the first week of January. I'm going to go ahead and close this issue now.
Thanks @clearab! Already seems to work everywhere except iOS 馃檹
Most helpful comment
The work has been completed for this, but the validation and rollout is pending. Will get back when we have an ETA for WW deployment.