+ Start a Discussion

Wrong business hour shown

This is calculating wrong time, 
cas.Email_Template_GCS_CallBack_Time__c = BusinessHours.addGmt (cas.BusinessHoursId, cas.CreatedDate, (cas.Email_Template_GCS_Call_back_time_Number__c * 60 * 60 * 1000L).longValue()).format('MMMM dd yyyy hh:mm a z');


Date/Time Opened is 10/22/2014 2:07 PM

Value shown is 
Email Template GCS Call Back Time is October 21 2014 05:30 PM PDT

Email Template GCS Call back time Number is 0.5
ShashankShashank (Salesforce Developers) 
Can you explain a little more? Like what is the expected value, which timezone is the date/time opened that you mentioned is in, and what are the business hours exactly?