How to retrieve user's timezone in groovy
Summary:
adf.context.getSecurityContext()?.getUserProfile()?.getTimeZone() is returning null instead of user's timezone
Content (required):
We want to retrieve logged in user's preferred timezone which they have selected under Regional Preference.
We used standard inbuilt function to retrieve user's timezone, however, it is returning null.
def timeZone = adf.context.getSecurityContext()?.getUserProfile()?.getTimeZone();
Version (include the version you are using, if applicable):
23B (11.13.23.04.0)
Code Snippet (add any code snippets that support your topic, if applicable):
def timeZone = adf.context.getSecurityContext()?.getUserProfile()?.getTimeZone();
println(timeZone)
--Output--
null
Tagged:
0