#!/usr/local/bin/perl
use strict;
use Test::More;
use DateTime::Format::Pg;
my $duration = DateTime::Format::Pg->parse_duration('7 years 00:00:00.000003');
is($duration->nanoseconds, 3000, 'nanoseconds duration.');
done_testing();
The output is:
not ok 1 - nanoseconds duration.
# Failed test 'nanoseconds duration.'
# at datetime_format_pg.pl line 11.
# got: '3'
# expected: '3000'
1..1
Failing test below.
The output is: