[Dbix-class] Question about handling of undefined times with DBIx::Class::InflateColumn::DateTime

James Munson jmunson at gmail.com
Fri Feb 22 18:51:17 GMT 2008


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=3D7589 for more info, but sho=
rt
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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080222/47f=
3f803/attachment.htm


More information about the DBIx-Class mailing list