Get user's timezone in macro configuration Forge

Is there a way to get a user’s timezone in macro configuration? At the moment I am using Intl API Intl.DateTimeFormat - JavaScript | MDN but the timezone remains as ‘UTC’. I wish to have something more custom that is based on a user’s location or browser configuration.

Hi @GbemiKadri , the code for UI Kit and macro config is executed on the backend and so there’s no current way to get that info automatically, you may have to get the user to select it. I will pass on some feedback to see if we can get that in context.

An alternative would be to try Custom UI where your app runs within an iframe on the frontend so you could access time based on the user’s location.

3 Likes

Thanks for the reply @nhur

Hi @nhur ,
that’s a good idea to put the user’s timezone the context. :grinning:

In addition I’d like to ask to put the user’s locale also to the context. :pray:
I ask myself why at least there is no Confluence API to get this. Only Jira.
Or missed I something?

BR,
Franz

1 Like

I’ve updated the ticket and let my team know — and you can track its interest here: Forge - Issues - Ecosystem Jira. Thanks for the continued feedback, it really helps us prioritise things!

2 Likes