Nevermind, I fixed my own problem. It was a stupid mistake on my part (they usually are)
My problem was actually further down in my code. After getting my $formatted_date object from DateTime::Format::MySQL, I was mistakenly trying to create a new DateTime object with it, not realizing that $formatted_date is already the DateTime object that I needed. After taking that out, and using $formatted_date like I should have to begin with, its working now. - Meeko On Wed, Dec 29, 2010 at 7:10 PM, Meeko <[email protected]> wrote: > I'm having a problem with DateTime::Format::MySQL, and was wondering if > anyone could help. I have timestamps stored in a MySQL database, and am > trying to use this module to create a DateTime object with them. > > According to the module documentation, the usage is: > > use DateTime::Format::MySQL; > > my $dt = DateTime::Format::MySQL->parse_datetime( '2003-01-16 23:12:01' ); > > # 2003-01-16 23:12:01 > DateTime::Format::MySQL->format_datetime($dt); > > > In my code, I have a variable called $ts, which I have verified matches the > proper format by displaying it to the screen, like this: > > $ts contains: 2010-12-28 21:45:29 > > > However, when I add in the following code: > > my $formatted_date = DateTime::Format::MySQL->parse_datetime($ts); > > I get the following error: > > Caught exception in MyApp::Controller::Root->index "The following parameter > was passed in the call to DateTime::new but was not listed in the validation > options: local_rd_secs > > > I have tried googling for this error, but can't seem to find the answer. > Can anyone provide me with any insight as to what this error means? > Thanks! > > - Meeko >
_______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
