Timezone of timestamps on custom fields of opportunity object (Velocity)

Highlighted
Level 10 - Community Moderator

Re: Timezone of timestamps on custom fields of opportunity object (Velocity)

I wish there was a way that the velocity timestamp string carried through the timezone information for the incoming timestamp so things would be explicit.

Well, that's not really the problem. In SFDC the value is stored and exported as UTC (as it should be in any database). And in turn somewhere in Marketo it's also stored in UTC. But by the time you see it in Velocity, it's been serialized (stringified) in the pod timezone, which is Central.

This is clunky, but as long as you know it's happening should be predictable.

What you seem to be saying is that the serialization is not itself adjusting for daylight savings. But if it just broke at the daylight savings shift a few days ago, that means it would be stored in CDT, not CST (since right now America/Chicago is the same as CST).  Can you parse it as "CDT" and see what happens?

Highlighted
Level 7

Re: Timezone of timestamps on custom fields of opportunity object (Velocity)

Marketo servers are Central Time not Eastern Time that you've discerned.

Highlighted
Anonymous
Not applicable

Re: Timezone of timestamps on custom fields of opportunity object (Velocity)

Jay,

Are you suggesting that all timestamp from Marketo opportunity timestamp fields will ALWAYS be in Central timezone?

Highlighted
Level 7

Re: Timezone of timestamps on custom fields of opportunity object (Velocity)

According to posts here, Marketo server time will always be -5 UTC. Format for Importing a DateTime field value from CSV

EDIT: I just dug up a piece of velocity code I've used previously based off Sanford's post. It's converting Central Time to Australian Time and I've had no issues.

#set ($fn = ${lead.Lead_Owner_First_Name})

#set ($ln = ${lead.Lead_Owner_Last_Name})

#set ($em = ${lead.Lead_Owner_Email_Address})

#set ($apptloc = ${OpportunityList.get(0).sageOppoAppointmentLocation})

#set ($firstappt = ${OpportunityList.get(0).sageOppoAppointmentDate})

#set ($inTimeZone = $date.getTimeZone().getTimeZone('US/Central') ) 

#set ($outTimeZone = $date.getTimeZone().getTimeZone('Australia/Sydney') ) 

#set ($locale = $date.getLocale() ) 

#set ($firstapptstart = $convert.parseDate($firstappt,'yyyy-MM-dd H:mm:ss',$locale,$inTimeZone) ) 

#set ($firstapptstartd = $date.format('yyyy-MM-dd',$firstapptstart,$locale,$outTimeZone))

#set ($firstapptstartt = $date.format('H:mm:ss',$firstapptstart,$locale,$outTimeZone))

#set ($calca = $math.toNumber($firstapptstart))

#set ($calcb = $math.add($calca,5400000))

#set ($firstapptend = $date.toDate($calcb))

#set ($firstapptendd = $date.format('yyyy-MM-dd',$firstapptend,$locale,$outTimeZone))

#set ($firstapptendt = $date.format('H:mm:ss',$firstapptend,$locale,$outTimeZone))

ics.agical.io/?description=Hi%20${lead.FirstName},%5C%6E%5C%6ELooking%20forward%20to%20meeting%20you.%5C%6E%5C%6ERegards,%5C%6E${fn}%20${ln}&organizer=${em}&location=${apptloc}&dtstart=${firstapptstartd}T${firstapptstartt}Z&dtend=${firstapptendd}T${firstapptendt}Z&subject=Meeting%20with%20${fn}%20${ln}&reminder=1440

Highlighted
Level 10 - Community Moderator

Re: Timezone of timestamps on custom fields of opportunity object (Velocity)

According to posts here, Marketo server time will always be -5 UTC

That was somebody's shorthand for Central, they shouldn't have implied a fixed offset.