| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
|
| 4 |
use lib 't/lib'; |
| 5 |
use T::RequireDateTime; |
| 6 |
|
| 7 |
use Test::More; |
| 8 |
|
| 9 |
# Some time zone observances in the Olson DB have short names like |
| 10 |
# "GMT/BST", which means "alternate between GMT and BST". This tests |
| 11 |
# that the parser does the right thing. |
| 12 |
{ |
| 13 |
my $dt = DateTime->new( |
| 14 |
year => 2005, month => 6, |
| 15 |
time_zone => 'Europe/London' |
| 16 |
); |
| 17 |
|
| 18 |
is( $dt->time_zone_short_name, 'BST', 'time zone short name is BST' ); |
| 19 |
} |
| 20 |
|
| 21 |
{ |
| 22 |
my $dt = DateTime->new( |
| 23 |
year => 2005, month => 1, |
| 24 |
time_zone => 'Europe/London' |
| 25 |
); |
| 26 |
|
| 27 |
is( $dt->time_zone_short_name, 'GMT', 'time zone short name is GMT' ); |
| 28 |
} |
| 29 |
|
| 30 |
done_testing(); |