[rt-users] Date formatting

Rinke Colen rcolen at experty.com
Wed Oct 15 04:40:46 EDT 2014


On Wed, Oct 15, 2014 at 10:29 AM, Emmanuel Lacour
<elacour at easter-eggs.com> wrote:
> Le 15/10/2014 10:21, Rinke Colen a écrit :
> > Does anyone know how to format the date/time that {$Ticket->Created}
> > returns in my email template? I want it to read "Wednesday October 8,
> > 2014 at 5:31 PM (CET)" or "Woensdag 8 oktober 2014 om 17:31 (CET)".
> > (Second version is Dutch.)
>
> Use $Ticket->CreatedObj instead of $Ticket->Created, this will give you
> an RT::Date object. Then look at lib/RT/Date.pm there is many formatting
> methods. If none suit your needs, you can "easily" write new one in
> local/lib/RT/Date_Local.pm

OK, great. Problem is that my Perl knowledge is too small to fully
understand the documentation on RT::Date or how to use the formatters
it mentions. Could anyone give an example?



More information about the rt-users mailing list