On Mon, May 21, 2007 at 10:58:34PM +0100, Chisel Wright wrote:
> On Mon, May 21, 2007 at 01:54:54PM -0700, Bill Moseley wrote:
> > What do you do?
>
> I inflate all my dates to DateTime objects:
>
> foreach my $datecol (qw/created/) {
> __PACKAGE__->inflate_column($datecol, {
> inflate => sub { DateTime::Format::Pg->parse_datetime(shift); },
> deflate => sub { DateTime::Format::Pg->format_datetime(shift); },
> });
> }
DBIx::Class::InflateColumn::DateTime will do this part for you these days.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director Want a managed development or deployment platform?
Shadowcat Systems Ltd. Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/