Hi Guys,
How to get the timezone of the Connected User? In fact, I'm getting the value of the Date/Time CustomField related to the timeZone of the Server, what I need is the value related to the timezone of the connected user. Could you please help?
For more details, kindly, check my last comment in https://answers.atlassian.com/questions/324977/get-datetime-customfield-value?page=1#comment-325305
Thanks,
Rosy
Hello Sreenivas P, No I didn't find it. If you check my latest comment here, you will see how I resolved it! :) Regards, Rosy
Hi Rosy, Did you get t api to get Date/Time field value related to the timezone of the connected user. If yes, can you please share it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alexey for the tip :) !
I got it using the following code:
ExtendedPreferences extPref = userPreferencesManager.getExtendedPreferences(authenticationContext.getUser());
log.debug("timeZone: " + extPref.getString(PreferenceKeys.USER_TIMEZONE));
Many thanks,
Rosy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I cannot give you absolutely correct answer, but most possible, you should get user using
https://docs.atlassian.com/jira/6.2.1/com/atlassian/jira/user/util/UserUtil.html
and then either check the user property or user preference (I have idea that it is the second)
https://docs.atlassian.com/jira/6.2.7/com/atlassian/jira/user/UserPropertyManager.html
https://docs.atlassian.com/jira/6.2.7/com/atlassian/jira/user/preferences/UserPreferencesManager.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.