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
Adu86Adu86 

Incorrect Date is sent to External system through web service request call for records with effectivedate field after Nov 2nd-Day light Saving Effect?

Hi,
 
We have a XML request sent to external system (3rd party system) using Web service request call. The date that we input into "effectivedate" field (Data type =date) for a record is sent with one day less to external system.
For Example: If we put 11/10/2014 in salesforce record. Other system is receiving it as 11/09/2014 in the XML request.
 
While debugging in salesforce the date field is captured as 11-10-2014 00:00:00 but in the XML request that we send to other system it was captured as 11-09-2014 T23:00:00-05:00
 
Note: This is happening only with the "effectivedate" field selected after 11-02-2014. Is it because of the Day light saving which is showing as 11:00pm EST in the XML request file?.  We are using “Date.valueof” function in the web service apex class for the "effectivedate" field.
 
 Is there any workaround for this?

Thanks
ShashankShashank (Salesforce Developers) 
You may find this helpful: http://www.force2b.net/index.php/2010/08/date-time-and-timezone-handling-in-apex/