my $format = DateTime::Format::Strptime->new( pattern => '%Y-%m-%d %H:%M:%S', time_zone => 'local', ); my $min_start = DateTime->new( year => 2007, month => 5, day => 1, time_zone => 'local' ); my $max_stop = DateTime->new( year => 2008, month => 5, day => 1, time_zone => 'local' );