Email Script - Time Populating 1 Hour Early | Community
Skip to main content
Level 2
August 27, 2021
Question

Email Script - Time Populating 1 Hour Early

  • August 27, 2021
  • 1 reply
  • 3827 views

I currently have an email script I am using to populate a time, and it is populating 1 hour earlier than the value that is in SFDC. We are using the email script to pull in the time of the earliest (date-wise) item within the object. Our Salesforce Dev team has informed me that the times show in local time zones in SFDC, so I don't believe that should be an issue but am not sure. Any help is appreciated.

 

 

#set( $FlightLegsFromEarliest = $sorter.sort($Flight_Leg__cList,["Est_Departure_Time_EST__c:asc"]) ) #foreach($Flight_Leg__c in $FlightLegsFromEarliest ) #if(${Flight_Leg__c.Status__c}== "Booked") #set( $matchedFlightLeg = $Flight_Leg__c ) #break #end #end ##OutPut Est_Departure_Time_EST__c #if($matchedFlightLeg) $matchedFlightLeg.Est_Departure_Time_EST__c## #end

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

peter_fedewa1
Level 2
August 27, 2021

Shot in the dark here. Is one of your systems not accounting for daylight vs standard time?

 

It's possible that the time is "correct" for standard but an hour off for daylight.

- Peter
amacneil1Author
Level 2
August 27, 2021

I was thinking about that - our Salesforce timestamp is EST and Marketo is EDT. Do you think that's the issue? If so, do you know the best way to resolve?

SanfordWhiteman
Level 10
August 27, 2021

Highly doubt this has anything to do with Daylight Savings. Rather, it directly relates to different time zones.

 

Is the SFDC field a standard Datetime? If so, the value is stored in UTC — regardless of display — just as it is in Marketo. But the name having “EST” in it is curious. Is it actually a String in SFDC that hard-codes a local time? That’s very dangerous but changes the required solution.