fractional_seconds is deprecated... nanoseconds have to be specified separately. I dunno if Pg has been updated to use the new interface yet. -ben On Tue, Jul 15, 2003 at 12:30:39PM -0700, Alex Boster wrote: > 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. > > [aboster@data 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); > > [aboster@data 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 > [aboster@data 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...Thread Previous