botframework-sdk
botframework-sdk copied to clipboard
Enhance Activity schema to include client's timezone
Is your feature request related to a problem? Please describe.
- We have users in different timezones, so it would be useful to retrieve the client's timezone from the activity schema.
Describe the solution you'd like
- For activity schema to include a
LocalDateTimeorTimeZoneproperty.
Describe alternatives you've considered
- I tried deriving the timezone from the
localTimestampfield, however, since it is aDateTimeobject is does not include timezone information. - Suggest:
- Changing
localTimestampfield toLocalDateTimetype - OR include a
TimeZonetype in the Activity schema
- Changing
Additional context
- The JSON payload
localTimestampfield does include the timezone, but when deserialised into Java it is lost, so it stores the same value astimestamp:
JSON payload field (in bot emulator):

Java field (in IntelliJ debugger):

[enhancement]
Looks like DateTime does encode TimeZone, LocalDateTime does not (my bad).
Need to call DateTime#getZone() method.
But still, my local time zone of UTC+12 is converted to UTC when deserialised into Java ?