<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid:E1Im6oG-0005lQ-1C@jules.scsys.co.uk" type="cite">
<pre wrap="">
Message: 2
Date: Sat, 27 Oct 2007 07:14:24 -0500
From: Jonathan Rockway <a class="moz-txt-link-rfc2396E" href="mailto:jon@jrock.us"><jon@jrock.us></a>
Subject: Re: [Dbix-class] inflate_column with DateTime::Format::MySQL
        and        invalid dates
To: DBIx::Class user and developer list <a class="moz-txt-link-rfc2396E" href="mailto:dbix-class@lists.scsys.co.uk"><dbix-class@lists.scsys.co.uk></a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:47232BA0.2080207@jrock.us"><47232BA0.2080207@jrock.us></a>
Content-Type: text/plain; charset="iso-8859-1"
Ash Berlin wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm not sure if InflateColumn::DateTime will handle this better or not,
but its the first thing to try.
Ash
</pre>
</blockquote>
<pre wrap=""><!---->InflateColumn::DateTime basically does the same thing. The solution
would be to remove the corrupt data from the database, or maybe modify
DT::Format::MySQL to convert 0000-00-00 00:00:00 into "undef". I think
0000-00-00 00:00:00 is meant to be treated as NULL, right?
Regards,
Jonathan Rockway
</pre>
</blockquote>
Hi,<br>
<br>
You are right, my database schema allows these dates to be NULL until
they get set intentionally. But, I'm using CGI::FormBuilder to
validate the form submissions. If the date field in question is left
blank, Formbuilder seems to be converting it to 0000-00-00 00:00:00.
Which of course suggests that I test for that and don't blindly stuff
everything from Formbuilder into my table.<br>
<br>
Thanks much<br>
<pre class="moz-signature" cols="72">--
Randy Moore
Axion Information Technologies, Inc.
phone: 301-587-3300 x 511
fax: 301-585-7450
<a class="moz-txt-link-freetext" href="http://www.axion-it.com">http://www.axion-it.com</a>
</pre>
</body>
</html>