[Dbix-class] InflateColumn::DateTime - how to use it?

John Napiorkowski jjn1056 at yahoo.com
Thu May 24 01:14:47 GMT 2007


--- Tom Lanyon <tom at netspot.com.au> wrote:

> 
> On 24/05/2007, at 5:06 AM, Jason Kohles wrote:
> 
> > On May 17, 2007, at 8:21 AM, Jess Robinson wrote:
> >
> > Is the mailing list the appropriate way to get  
> > InflateColumn::DateTime patched?  I put this
> simple little patch in  
> > RT a while ago but it never seemed to get acted
> on, and it would be  
> > nice if I didn't have to keep re-applying it every
> time I upgrade  :)
> >
> > Index: DateTime.pm
> >
>
===================================================================
> > --- DateTime.pm (revision 3369)
> > +++ DateTime.pm (working copy)
> > @@ -54,7 +54,7 @@
> >    $self->next::method($column, $info, @rest);
> >    return unless defined($info->{data_type});
> >    my $type = lc($info->{data_type});
> > -  $type = 'datetime' if ($type eq 'timestamp');
> > +  $type = 'datetime' if ($type =~ /timestamp/);
> >    if ($type eq 'datetime' || $type eq 'date') {
> >      my ($parse, $format) = ("parse_${type}",
> "format_${type}");
> >      $self->inflate_column(
> 
> 
> 
> Jason,
> 
> Just curious, what column type are you using that
> includes  
> 'timestamp' as well as other chars?
> 
> Tom

Hey,

I also have a similar problem because when I use
DBIC::Schema::Loader to help me bootstrap from
existing database I often get "TIMESTAMP WITH
TIMEZONE" for the generated data_type.  I just remove
that stuff manually but I can see why it could mess
someone up.  It never bothered me some much to offer a
patch.  I usually end up manually updating the
generated classes a lot, but appreciated the jumpstart
saving me typing in a lot of column info.

--john 
--john

> 
> _______________________________________________
> List:
>
http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
> Wiki: http://dbix-class.shadowcatsystems.co.uk/
> IRC: irc.perl.org#dbix-class
> SVN:
>
http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
> Searchable Archive:
>
http://www.mail-archive.com/dbix-class@lists.rawmode.org/
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Dbix-class mailing list