Richard Jones wrote: > There is obviously something amiss because if I omit my own > date_to_mysql() method then system tries to retrieve dates in > dd/mm/yyyy format.
I think you're misunderstanding InflateColumn::DateTime. Here's some
example code:
$some_rs->create({ creation_time => DateTime->now });
As you can see, I never do any string manipulation with the date. I get
a DateTime object, and put it in the database. The other details are
handled by the deflation.
If you want to put EU-formatted dates into your database, the idea is
exactly the same. You use the EU-formatted date to get a DateTime
object (via a DateTime::Format), then you just put the DateTime object
into the database (and you get one back out when you query for it). The
fact that a date was specially formatted is only known momentarily.
Once you have a DateTime object, it's just a date and time.
I'm not sure about the details of the parsing though... I'm a dumb
American so it's never occurred to me to parse non-US dates :)
DateTime::Format is the namespace for parsers, though, so I guess you
should look there.
Hope this helps.
Regards,
Jonathan Rockway
signature.asc
Description: OpenPGP digital signature
_______________________________________________ List: http://lists.rawmode.org/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]
