Skip Menu |

This queue is for tickets about the DateTime-Format-DateParse CPAN distribution.

Report information
The Basics
Id: 52470
Status: resolved
Worked: 10 min
Priority: 0/
Queue: DateTime-Format-DateParse

People
Owner: Nobody in particular
Requestors: GRAF [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: Test failure
Test fails with current DateTime 0.52 probably because starting with 0.52 DateTime->new accepts integer values only. t/02_date.t ..... 1/123 The 'nanosecond' parameter ("182321300.000002") to DateTime::new did not pass the 'a positive integer' callback at /opt/perl/5.10.1/lib/site_perl/x86_64-linux/DateTime.pm line 176 DateTime::new(undef, 'hour', 09, 'minute', 08, 'second', 17, 'day', 24, ...) called at lib/DateTime/Format/DateParse.pm line 69 DateTime::Format::DateParse::parse_datetime('DateTime::Format::DateParse', '1995-01-24T09:08:17.1823213') called at t/02_date.t line 144 # Looks like you planned 123 tests but ran 1. # Looks like your test exited with 255 just after 1. t/02_date.t ..... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 122/123 subtests
Subject: Test failure - Nanoseconds is not an integer [PATCH]
I have reproduced this on a Fedora 8 system; perl 5.8.8, DateTime 0.53. Applying the int operator to the result of the nanosecond operation seems to fix it.
Subject: perl-DateTime-Format-DateParse-int_nanoseconds.patch
--- lib/DateTime/Format/DateParse.pm 2010-03-03 10:23:01.000000000 -0500 +++ lib/DateTime/Format/DateParse.pm 2010-03-03 10:23:09.000000000 -0500 @@ -31,7 +31,7 @@ my %p; if ( $ss ) { my $fraction = $ss - int( $ss ); - $p{ nanosecond } = $fraction * 1e9 if $fraction; + $p{ nanosecond } = int $fraction * 1e9 if $fraction; $p{ second } = int $ss; } $p{ minute } = $mm if $mm;
On Wed Mar 03 10:59:24 2010, POSSUM wrote: Show quoted text
> I have reproduced this on a Fedora 8 system; perl 5.8.8, DateTime 0.53. > > Applying the int operator to the result of the nanosecond operation > seems to fix it.
I assume that this issue was fixed in DateTime.pm itself. Is there still a reproducable issue here? -Josh --
Show quoted text
> I assume that this issue was fixed in DateTime.pm itself. Is there > still a reproducable issue here?
Installs fine with a (fairly) current DateTime 0.70.
On Mon Feb 13 03:09:42 2012, GRAF wrote: Show quoted text
> > I assume that this issue was fixed in DateTime.pm itself. Is there > > still a reproducable issue here?
> > Installs fine with a (fairly) current DateTime 0.70.
Great - I'm going to go ahead and close this ticket out then. Thanks for reporting. -Josh --