function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sieb4mesieb4me 

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');

Example 

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?