line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Time::Strptime::TimeZone; |
2
|
4
|
|
|
4
|
|
27
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
97
|
|
3
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
87
|
|
4
|
4
|
|
|
4
|
|
20
|
use utf8; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
28
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
1810
|
use DateTime::TimeZone; |
|
4
|
|
|
|
|
125577
|
|
|
4
|
|
|
|
|
131
|
|
7
|
4
|
|
|
4
|
|
32
|
use Scalar::Util qw/blessed/; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
202
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
23
|
use constant UNIX_EPOCH => 62135683200; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
865
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $DEFAULT = 'local'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
23
|
|
|
23
|
0
|
55
|
my ($class, $name) = @_; |
15
|
23
|
|
66
|
|
|
59
|
$name ||= $DEFAULT; |
16
|
23
|
50
|
33
|
|
|
146
|
my $tz = blessed $name && $name->isa('DateTime::TimeZone') ? $name : DateTime::TimeZone->new(name => $name); |
17
|
23
|
|
|
|
|
1775
|
return bless [$tz, 0] => $class; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
40
|
|
|
40
|
0
|
116
|
sub name { $_[0]->[0]->name } |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
0
|
0
|
|
sub local_rd_as_seconds { $_[0]->[1] + UNIX_EPOCH } |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
0
|
0
|
|
sub set_timezone { $_[0]->[0] = DateTime::TimeZone->new(name => $_[1]) } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub offset { |
27
|
0
|
|
|
0
|
0
|
|
$_[0]->[1] = $_[1]; |
28
|
0
|
|
|
|
|
|
$_[0]->[0]->offset_for_local_datetime($_[0]); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |