[rt-users] Date formatting
Emmanuel Lacour
elacour at easter-eggs.com
Wed Oct 15 04:29:58 EDT 2014
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
--
Easter-eggs Spécialiste GNU/Linux
44-46 rue de l'Ouest - 75014 Paris - France - Métro Gaité
Phone: +33 (0) 1 43 35 00 37 - Fax: +33 (0) 1 43 35 00 76
mailto:elacour at easter-eggs.com - http://www.easter-eggs.com
More information about the rt-users
mailing list