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
SoleesSolees 

How to get Salesforce Timezone from Jitterbit

Hi friends,

 

i'm posting this because Jitterbit does not have a lot of documentation about Salesforce.  If you ever need to send information from Salesforce through an Outbound Message to Jitterbit and you have Date/Time Fields, you will need the timezone since Salesforce sends the UTC time.  A work around that i found is this:

 

$SFFechaHoraActual=Date(LoginToSalesforceAndGetTimestamp("<TAG>Salesforce Orgs/admin@yourorg.com</TAG>"));
$SFFechaHoraActualCST=Date(FromDataLoaderDateTime($SFFechaHoraActual,"CST",true));
$TimeZoneDiff=Long($SFFechaHoraActualCST)- Long($SFFechaHoraActual);

 

Now you have the TimeZone in number and you could easy modify your date fields:

 

$SFFecha=if(IsNull($SFFecha) || $SFFecha=='', Now(), Date(Long($SFFecha)-Long($TimeZoneDiff)));

 

 

Cheers

Best Answer chosen by Admin (Salesforce Developers) 
Satish_SFDCSatish_SFDC
Thanks, This might come in handy someday.

Thanks for the info.

Regards,
Satish Kumar