I am creating a Chatbot where i would to like to show timing details in local timezone. Does Facebook Messenger provides the timezone on the subscribed webhook?
Asked
Active
Viewed 2,320 times
1 Answers
2
As you can see in the received message, the timezone isn't specified:
{
...
"timestamp":1458692752478,
...
}
But you can get the timezone of the user using the user profile:
{
...
"timezone": -7,
...
}
With that information, you get the real date depending on the user timezone.

j0k
- 22,600
- 28
- 79
- 90
-
1Do you know if this changes automatically based on the timezone the user is in or the default set at the profile level? I got to thinking if someone sets up a 7am Daily Digest time could they potentially get it at 4am on the opposite coast? – Michael Bailey Jul 14 '17 at 05:16
-
It uses the default set at the profile level. Your defined timezone on Facebook does change when you travel (as far as I know) – j0k Jul 14 '17 at 20:43
-
@j0k but this timezone is not precise, since for instance you can find 2 different timezones having the same value in number(+3 for instance). Doesn't the time change for two timezones which has different name but same numeric value? – aidonsnous Aug 14 '17 at 05:19