[Dbix-class] InflateColumn::DateTime

Jonas jonas.alves at gmail.com
Thu Aug 10 19:28:10 CEST 2006


Ok, i was being really really dumb. After reading the message that i
wrote I've noticed that the first field is a datetime and second field
is a date. And i was always updating the two fields with the same
value. So when the first was right the second was not and vice versa.

Thanks anyway,
--Jonas

On 10/08/06, Jonas <jonas.alves at gmail.com> wrote:
> You are right Matt. I'm sorry for that.
>
> The database i'm using is SQLite. I have just one row:
>
> sqlite> select * from dvd;
> 5|Jurassic Park II|133|1|2|2000-02-02 10:00:00|2000-02-02 10:00:00|10:00
>
> Here is the relevant column definition:
>
> __PACKAGE__->add_columns(
>           <striped>
>           'alter_date' => {
>                             'data_type' => 'datetime',
>                             'name' => 'alter_date',
>                             'label' => 'Alter Date',
>                             'is_nullable' => 0,
>                             'size' => undef
>                           },
>           'creation_date' => {
>                                'data_type' => 'date',
>                                'name' => 'creation_date',
>                                'label' => 'Creation Date',
>                                'is_nullable' => 0,
>                                'size' => undef
>                              },
>           <striped>
> );
>
> I will try to get a simple script that reproduces the error.
>
> Thanks
> --Jonas
>
> On 10/08/06, Matt S Trout <dbix-class at trout.me.uk> wrote:
> > Jonas wrote:
> > > Hi,
> > > I'm trying to use InflateColumn::DateTime but i'm getting the
> > > following error when dbic tries to deflate a date from the db:
> > > DVDzbr::Controller::Dvd->list "Invalid date format: 2000-02-02 at
> > > /Library/Perl/5.8.6/Catalyst.pm line 1143
> > >
> > > I think the date is in the correct format. Am i doing something wrong?
> >
> > Given you haven't showed us the class and code in question, or mentioned which
> > database you're using, or provided a script that reproduces the error outside
> > of Catalyst so we get a proper error trace ... "don't know".
> >
> > _______________________________________________
> > 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/
> >
>



More information about the Dbix-class mailing list