Accessing the Time Zone of User/Contributor of a Work item
One answer
It looks like the Work Location settings, including time zone, for a user are not stored as string extensions on the IContributorDetails (like work item email settings are) but rather as a modeled item in the Agile Planning support.
com.ibm.team.apt.common.resource.IWorkLocationDefinition
has properties: timeZone, zoneOffset, language, country, variant, workDays
I don't see any public API for obtaining this, but there's an internal client library.
See:
com.ibm.team.apt.internal.client.resource.ResourcePlanningClient:
ResourcePlanningManager getResourcePlanningManager()
com.ibm.team.apt.internal.client.resource.ResourcePlanningManager:
IContributorInfo getContributorInfo(final IContributorHandle contributor, final boolean refresh, final IProgressMonitor monitor)
com.ibm.team.apt.internal.client.resource.IContributorInfo:
IWorkLocationDefinition getWorkLocation(IContributorHandle contributor)
So something like: teamRepository.getClientLibrary(ResourcePlanningClient.class).getResourcePlanningManager().getContributorInfo(contributorHandle, false, aMonitor).getWorkLocation(contributorHandle)
should do the trick.
Hopefully the planning team won't have my head for pointing you this way.
com.ibm.team.apt.common.resource.IWorkLocationDefinition
has properties: timeZone, zoneOffset, language, country, variant, workDays
I don't see any public API for obtaining this, but there's an internal client library.
See:
com.ibm.team.apt.internal.client.resource.ResourcePlanningClient:
ResourcePlanningManager getResourcePlanningManager()
com.ibm.team.apt.internal.client.resource.ResourcePlanningManager:
IContributorInfo getContributorInfo(final IContributorHandle contributor, final boolean refresh, final IProgressMonitor monitor)
com.ibm.team.apt.internal.client.resource.IContributorInfo:
IWorkLocationDefinition getWorkLocation(IContributorHandle contributor)
So something like: teamRepository.getClientLibrary(ResourcePlanningClient.class).getResourcePlanningManager().getContributorInfo(contributorHandle, false, aMonitor).getWorkLocation(contributorHandle)
should do the trick.
Hopefully the planning team won't have my head for pointing you this way.