We have existing code to retrieve user detail by component level getPetrson call. Perhaps the last developer did component level getPerson due to performance benefits.
But now I have requriement that all the date fields in the getPerson response must have dates in timezone as per the defined value in requesterTimeZone field.
I have 2 options
- Convert all component level getParty into controller level and set timezone. 2. Manually write codes to convert list of 20 - 25 date field values into a timezone defined in requesterTimeZone.
Which one is really performance benificial . is there a way at component level getPerson call to set requesterTimeZone as say IST or PST but the stored value in DB is by default GMT.
Finally I used the ObjectHierarchyMetadata.addHandler(BusinessObjectTimeZoneConverterHandler); & ObjectHierarchyMetadata.execute(anyBobj); to convert a anyBObj got using component level get call.