We're Hiring!

Mattermost, Inc.

API to retrieve user's current time/timezone?

I would like to find out a particular user’s current time. I found that that “get user” API (Mattermost API Reference) returns a timezone key, but the content is not particularly useful for most users:

timezone: { automaticTimezone: "", manualTimezone: "", useAutomaticTimezone: "true" },

Is there any API I can use to retrieve a user’s current time or timezone?

Ok, answering myself. It looks like that you have to enable timezone support as an experimental feature for timezones to appear in profiles, this also sets the “automatic timezone” in the API. It looks like the Mattermost web app implement a bunch of complicated logic to turn the timezone into a proper current time for the user, there’s no such thing as a free lunch apparently.