Date formatting

Wondering if RT has this functionality and I missed it somewhere. If it does
not, it may be useful for some that want more control over the formatting of
the date. Then from templates, or where ever you want to print the date, can
use something like

passing it the format string you want the date output in TEMPLATE. Create
the string using any of the allowable format parameters from Date::Format,
there is quite a few.

eg. In a template can have something like:
On {$Ticket->CreatedObj->DateFormat("%B %e, %Y")} your machine was detected
to have unauthorized software.
would result in:
On July 16, 2004 your machine was detected to have unauthorized software.

Perhaps this could be added to base RT if not there in 3.2.1?

Created the file: /opt/rt3/local/lib/

use Date::Format;

sub DateFormat {
my $self = shift;
my $template = shift;
return ($self->loc(“Not set”)) if ($self->Unix <= 0);

return (time2str($template,$self->Unix));



This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier �lectronique est confidentiel et prot�g�. L’exp�diteur ne renonce pas aux droits et obligations qui s’y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu’il contient par une personne autre que le (les) destinataire(s) d�sign�(s) est interdite. Si vous recevez ce courrier �lectronique par erreur, veuillez m’en aviser imm�diatement, par retour de courrier �lectronique ou par un autre moyen.