Subject: | parse_datetime emits warnings when parsing fractions of second |
With code:
use DateTime::Format::RFC3339;
my $f = DateTime::Format::RFC3339->new();
my $dt = $f->parse_datetime('2009-07-10T13:12:44.731+03:00');
These are warned:
Use of uninitialized value in string at
.../lib/perl5/DateTime/Format/RFC3339.pm line 54.
Argument "" isn't numeric in addition (+) at
.../lib/perl5/DateTime/Format/RFC3339.pm line 54.
The line 54 is:
my $ns = $str =~ s/^\.(\d{1,9})\d*// ? 0+substr("$1000000000",0,9) : 0;