[Catalyst] datetime formatting ...
Kiffin Gish
kiffin.gish at planet.nl
Sat Feb 13 17:33:09 GMT 2010
That worked, thanks. Only weird thing now is that the time is one hour
behind.
On Thu, 2010-02-11 at 12:45 -0300, Eden Cardim wrote:
> >>>>> "Kiffin" == Kiffin Gish <kiffin.gish at planet.nl> writes:
>
> Kiffin> I've got a datetime column defined:
> __PACKAGE__-> add_columns(
> Kiffin> ... "last_modified", { data_type => "DATETIME",
> Kiffin> default_value => undef, is_nullable => 1, size => undef, },
> Kiffin> );
>
> Kiffin> For some reason it's being displayed like this:
>
> Kiffin> "2010-01-05T20:35:14"
>
> Kiffin> How can I get that 'T' out of there, replacing it with the
> Kiffin> usual space?
>
> ->last_modified->strftime('%F %T')
>
> See perldoc DateTime for more formatting options.
>
--
Kiffin Gish <Kiffin.Gish at planet.nl>
Gouda, The Netherlands
More information about the Catalyst
mailing list