1# $Id: $
2use Test::More tests => 8;
3use DateTime::Format::Pg 0.02;
4
5{
6  my $dt = DateTime::Format::Pg->parse_datetime('1221-01-02 03:04:05+01 BC');
7  is($dt->year(),            -1220, 'year');
8  is($dt->month(),             01, 'month');
9  is($dt->day(),               02, 'day');
10  is($dt->hour(),              03, 'hour');
11  is($dt->minute(),            04, 'minute');
12  is($dt->second(),            05, 'second');
13  is($dt->nanosecond(),        00, 'nanosecond');
14  is($dt->offset(),  (1*60)*60, 'tz offset');
15}
16