[Catalyst] Format last modified date field ...
Kiffin Gish
kiffin.gish at planet.nl
Mon Dec 28 21:17:59 GMT 2009
I'm using a last_modified field which is being displayed like this
"2009-12-28T18:25:28" (what's that 'T' doing in there?) but want to use
a different format, how?
In the list.tt2 file for listing users, I have:
[% WHILE (user = users_rs.next) -%]
[% FOREACH col IN users_rs.result_source.columns -%]
[% user.$col %]</td>
[% END %]
[% END -%]
In the schema Users:
__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp",
"Core");
__PACKAGE__->table("users");
__PACKAGE__->add_columns(
...
"last_modified",
{
data_type => "DATETIME",
default_value => undef,
is_nullable => 1,
size => undef,
},
);
Thanks alot in advance.
--
Kiffin Gish <Kiffin.Gish at planet.nl>
Gouda, The Netherlands
More information about the Catalyst
mailing list