Debian Codegraph @

t/13short-name-has-slash.t

raw symbols SCIP
1 use strictscip-perl cpan DateTime-TimeZone 2.69 strict/;
2 use warningsscip-perl cpan DateTime-TimeZone 2.69 warnings/;
3
4 use libscip-perl cpan DateTime-TimeZone 2.69 lib/ 't/lib';
5 use T::RequireDateTimescip-perl cpan DateTime-TimeZone 2.69 T/RequireDateTime/;
6
7 use Test::Morescip-perl cpan DateTime-TimeZone 2.69 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->newscip-perl cpan DateTime-TimeZone 2.69 DateTime/new().(
14 year => 2005, month => 6,
15 time_zone => 'Europe/London'
16 );
17
18 isscip-perl cpan DateTime-TimeZone 2.69 main/is().( $dt->time_zone_short_namescip-perl cpan DateTime-TimeZone 2.69 DateTime/time_zone_short_name()., 'BST', 'time zone short name is BST' );
19 }
20
21 {
22 my $dt = DateTime->newscip-perl cpan DateTime-TimeZone 2.69 DateTime/new().(
23 year => 2005, month => 1,
24 time_zone => 'Europe/London'
25 );
26
27 isscip-perl cpan DateTime-TimeZone 2.69 main/is().( $dt->time_zone_short_namescip-perl cpan DateTime-TimeZone 2.69 DateTime/time_zone_short_name()., 'GMT', 'time zone short name is GMT' );
28 }
29
30 done_testingscip-perl cpan DateTime-TimeZone 2.69 main/done_testing().();