Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
anut
Contributor

Salesforce Date Conversion

We are using Talend Data Integration 6.1.1.  Data source to one of the ETL is from Salesforce/TargetX. 


In Salesforce, date field is seen as 2017-05-02T02:25:16.000Z but the same data using Talend's Salesforce Component, I see it as 2017-05-03T02:25:16.000Z .

 

As per my research so far, Salesforce is carrying all date/time values internally as GMT and then for display purposes, adjusts it to local time. GMT is 7 hours ahead of PDT. Talend doesn't seem to be handling the adjustment automatically in my case based on local server time.

 

Any suggestions on how to handle this ?

 

Thanks,

Labels (3)
6 Replies
TRF
Champion II

Did you check the timezone for the user associated to the tSalesforceConnection?
anut
Contributor
Author

User Timezone is PDT.

 

Thanks,

Anonymous
Not applicable

Hello,

Have you found a solution with talend, i have the same problem with the timezone ?

TRF
Champion II

Hi,

 

From Salesforce, define the connected user timezone as GMT, read the datatime value, then convert the result to the desired TZ with the appropriate Java code.

To Salesfore, define the connected user timezone as GMT, convert the datetime from the original TZ to GMT with the appropriate Java code, then load the result to Salesforce.

 

Note:

Supported time zones for Salesforce are here and here for the Java method TimeZone.getTimeZone.

Anonymous
Not applicable

Hi Twelve Stars,

Thanks but It's strange, i have a date 2017-10-27 in a file, i want to load it into salesforce object with talend, but finally i obtain 2017-10-26, my time zone on salesforce is GMT-0

Anonymous
Not applicable

Ok i found a solution, all date in sf database are stored with datetime so i have to convert my date to datetime 2017-09-22T12:00:00.000Z (example) to have exactly 2017-09-22 and not 2017-09-21