Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. zipToTimeZoneMap = new Map<String, String>();
  2.  
  3. for(Opportunity o :activelyWorkingoppsData)
  4. {
  5. String timeDiff = zipToTimeZoneMap.get(o.postal_code__c);
  6. System.debug('o.postal_code__c=================>'+o.postal_code__c);
  7. TimeZone__c tz = TimeZone__c.getValues(o.postal_code__c);
  8. System.debug(tz);
  9. integer d;
  10.  
  11. if(tz!=null){
  12. d = integer.ValueOf(tz.TimeDiff__c);
  13.  
  14. System.debug('integerD===========>'+d+'integerTZ==='+tz);
  15. localTime = system.Now().addHours(d).format('h:mm a');
  16. zipToTimeZoneMap.put(o.postal_code__c,localTime);
  17. System.debug('zipToTimeZoneMap=================>'+zipToTimeZoneMap);
  18. }
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement