AnsweredAssumed Answered

Set local timezone using Velocity scripts

Question asked by Nick Koutsioulis on Sep 1, 2016
Latest reply on Jan 11, 2019 by Sanford Whiteman

Hi all.

 

I am trying to use a script and Velocity to make the output of a date/time field more user friendly.

 

$date.format('MMMM dd, yyyy hh:mm a z', ${convert.parseDate(${lead.pexa_callbacktime}, 'yyyy-MM-dd')})

 

I am using the following Velocity script to achieve this, and so far I can successfully change the format, however it changes the timezone on me to GMT.  We are in Australia so need this to display AEST (or GMT+10).

 

The output i get is as follows.

Original Date/Time - 2016-09-14 11:00:00

Output after running through the above script - September 14, 2016 12:00 AM GMT

 

Any pointers on how to set the location or time zone in the output?  I am assuming this is picking up the timezone of Marketo's Apache server.

 

Thanks

Nick

Outcomes