blib/lib/DBIx/Class/TimeStamp/WithTimeZone.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 14 | 85.7 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | n/a | ||
total | 17 | 19 | 89.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package DBIx::Class::TimeStamp::WithTimeZone; | ||||||
2 | |||||||
3 | 1 | 1 | 21100 | use 5.010001; | |||
1 | 4 | ||||||
4 | 1 | 1 | 5 | use strict; | |||
1 | 2 | ||||||
1 | 21 | ||||||
5 | 1 | 1 | 5 | use warnings; | |||
1 | 6 | ||||||
1 | 37 | ||||||
6 | |||||||
7 | 1 | 1 | 5 | use base qw(DBIx::Class::TimeStamp); | |||
1 | 2 | ||||||
1 | 594 | ||||||
8 | |||||||
9 | 1 | 1 | 556 | use DateTime; | |||
0 | |||||||
0 | |||||||
10 | |||||||
11 | our $VERSION = '0.02'; | ||||||
12 | |||||||
13 | sub get_timestamp { | ||||||
14 | return DateTime->now->set_time_zone($ENV{TZ}||$ENV{TIMEZONE}||'GMT'); | ||||||
15 | } | ||||||
16 | |||||||
17 | 1; |