[Catalyst] datetime formatting ...

Dermot paikkos at googlemail.com
Wed Jan 6 16:10:35 GMT 2010


2010/1/6 Kiffin Gish <kiffin.gish at planet.nl>:
> I've got a datetime column defined:
>
> __PACKAGE__->add_columns(
>  ...
>  "last_modified",
>  {
>    data_type => "DATETIME",
>    default_value => undef,
>    is_nullable => 1,
>    size => undef,
>  },
> );
>
> For some reason it's being displayed like this:
>
> "2010-01-05T20:35:14"
>
> How can I get that 'T' out of there, replacing it with the usual space?

I could be wrong but that looks like the correct UTC format to me. Are
you using PostgreSQL? If you want to convert between date formats then
I'd suggest the DateTime module. It's what is used with the
InflateColumn. ( See
~/DBIx-Class-0.08115/lib/DBIx/Class/InflateColumn/DateTime.pm ).

HTH,
Dp.



More information about the Catalyst mailing list