DateTime::Format::Pg dies when I parse an ISO date.  Can anyone point me
in the right direction?  I looked at the module's code, and I can't find
the problem.  The regex should match and fractional_seconds is in fact
on the params list.

[EMAIL PROTECTED] aboster]$ cat dt_test.pl
#!/usr/local/bin/perl -w
                                                                                
use DateTime;
use DateTime::Format::Pg;
use strict;
                                                                                
my $str = '2003-07-14 09:37:33-07';
my $d = DateTime::Format::Pg->parse_datetime($str);
print Dumper(\$d);
                                                                                
[EMAIL PROTECTED] aboster]$ ./dt_test.pl
The following parameter was passed in the call to DateTime::new but was
not listed in the validation options: fractional_second
 at
/usr/local/lib/perl5/site_perl/5.8.0/DateTime/Format/Builder/Parser/Regex.pm line 135
[EMAIL PROTECTED] aboster]$

Since there are warnings in the docs about setting a timezone, I have
also tried instantiating the a DateTime::Format::Pg object with the
server_tz set and then calling the parse_timestamptz function.  The
behavior is the same. (No surprise as this is the first parser tried by
the more general function above.)

This is DateTime::Format::Pg version 0.04.

Thanks in advance,
Alex

PS: Here's hoping I haven't missed something really obvious and am
making a public spectacle of it...

Reply via email to