[Catalyst] Dealing with timestamps from Postgres
Tomas Doran
bobtfish at bobtfish.net
Thu Nov 3 10:04:45 GMT 2011
On 3 Nov 2011, at 02:05, Adam Jimerson wrote:
> but in my Catalyst app the
> date looks like this 2011-05-07T13:53:41. The "T" instead of the
> space is driving me crazy, I think it is coming from
> DateTime::Format:Pg
As other people have noted, what's happening is that
DateTime::Format:Pg is parsing the dates you get out of Postgres, and
handing you a DateTime object back.
You're then printing that with no formatting, as you're basically
getting an ISO8601 timestamp out.
Have a look at the docs for DateTime and the associated
DateTime::Format::XX things :)
Cheers
t0m
More information about the Catalyst
mailing list