|
Packit |
9002b2 |
use strict;
|
|
Packit |
9002b2 |
use warnings;
|
|
Packit |
9002b2 |
|
|
Packit |
9002b2 |
use Test::More;
|
|
Packit |
9002b2 |
|
|
Packit |
9002b2 |
use DateTime::Format::Builder;
|
|
Packit |
9002b2 |
|
|
Packit |
9002b2 |
{
|
|
Packit |
9002b2 |
my $parser = DateTime::Format::Builder->parser(
|
|
Packit |
9002b2 |
{
|
|
Packit |
9002b2 |
params => [qw( year month day hour minute second )],
|
|
Packit |
9002b2 |
regex => qr/^(\d\d\d\d)(\d\d)(\d\d)T(\d\d)(\d\d)(\d\d)$/,
|
|
Packit |
9002b2 |
extra => { time_zone => 'America/Chicago' },
|
|
Packit |
9002b2 |
}
|
|
Packit |
9002b2 |
);
|
|
Packit |
9002b2 |
|
|
Packit |
9002b2 |
my $dt = $parser->parse_datetime("20030716T163245");
|
|
Packit |
9002b2 |
|
|
Packit |
9002b2 |
is( $dt->time_zone->name, 'America/Chicago' );
|
|
Packit |
9002b2 |
}
|
|
Packit |
9002b2 |
|
|
Packit |
9002b2 |
done_testing();
|