This retrieves the entire user object, which includes timeZone property. However, it is unclear if this property is actually retrieved from the Atlassian ID account preference, or if this is the system timezone.
The reason why this is unclear is because apparently there is also a User Management API which I assume actually holds the most up-to-date information of the Atlassian ID account information, including locale and timezone.
The documentation says you can generate an API key for it, I was assuming that would work? I mean, I’d rather do it within the context of the Connect app, but if this is the right API to get timezone information, I can add the API key to my environment variables.
Oh shit, is that API only available to the current user, even though it asks for account ID? What is the point of having an API key for that user, and asking to provide an account ID in the path?
Oh well… ok, that won’t work. Let’s hope that the Jira.User timeZone property is accurate
This retrieves the entire user object, which includes timeZone property. However, it is unclear if this property is actually retrieved from the Atlassian ID account preference, or if this is the system timezone.
Is there a preference from Atlassian with regard to which API we should use, and which API is the most up-to-date?
I don’t think there is a preference per se, but as @danielwester inferred, apps will probably want to call GET /rest/api/3/user. My test was manual, but the time zone preference was updated quickly.
It seems, when call is made from Connect app, it returns system time zone unless user has set time zone privacy setting to “Anyone”.
Is there any way to work around this for use cases when actual time zone information is critical for end user experience?