FAQ
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101229/2b5ccd8d/attachment.htm

Search Discussions

  • Meeko at Dec 30, 2010 at 2:22 am
    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 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
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20101229/7073cea2/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedDec 30, '10 at 12:10a
activeDec 30, '10 at 2:22a
posts2
users1
websitecatalystframework.org
irc#catalyst

1 user in discussion

Meeko: 2 posts

People

Translate

site design / logo © 2022 Grokbase