I'd just like to give a quick update: Apparently if you set it so the field
allows nulls, it will return a null value instead of all 0s and make
everything else behave properly. This might not be acceptable for some
situations, but works well in mine. Maybe this should be pointed out
somewhere in the documentation?

On Fri, Feb 22, 2008 at 12:51 PM, James Munson <[EMAIL PROTECTED]> wrote:

> I know this has been touched on before a few years ago, but I can't seem
> to track down any fix or 'official workarounds'.
> The problem is that MySQL's default dates are all 0s, and DateTime has no
> means of representing them(that I can see).
>
> This leads to the error of
>
> undef error - The 'month'
> parameter ("00") to DateTime::new did not pass the 'is between 1 and 12' 
> callback at 
> /usr/local/share/perl/5.8.7/DateTime/Format/Builder/Parser/Regex.pm line 135
>
> There is a closed ticket on the issue at
> http://rt.cpan.org/Public/Bug/Display.html?id=7589 for more info, but
> short of changing your database I can't really find a clean solution to the
> problem. He mentioned doing a regexp check before using DateTime, but with
> InflateColumn I'm not sure if I even could do that if I wanted to. Does
> anyone have any good workarounds for this problem?
>
>
>
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]

Reply via email to