AnsweredAssumed Answered

Set local timezone using Velocity scripts

Question asked by a72e06c9e7205b782ed0a2a7804eb864b7fc5520 on Sep 1, 2016
Latest reply on Dec 22, 2016 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.