| 1 | package DBIx::MoCo::Column::UTCDateTime; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use DateTime; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use DateTime::Format::MySQL; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 4 | ▶ | sub UTCDateTime { | ||||||||
|
Subroutine
UTCDateTime: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 8 | 4 | my $self = shift; | |||||||||
| 9 | 4 | ▶ | return if not $$self; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 10 | 3 | ▶ | return if $$self =~ /0000/o; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 3 | my $dt = DateTime::Format::MySQL->parse_datetime($$self); | |||||||||
| 12 | 3 | $dt->set_time_zone('UTC'); | |||||||||
| 13 | 3 | return $dt; | |||||||||
| 14 | } | ||||||||||
| 15 | |||||||||||
| 16 | 2 | ▶ | sub UTCDateTime_as_string { | ||||||||
|
Subroutine
UTCDateTime_as_string: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||
| 17 | 2 | my $class = shift; | |||||||||
| 18 | 2 | ▶ | my $dt = shift or return; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 2 | $dt->set_time_zone('UTC'); | |||||||||
| 20 | 2 | return DateTime::Format::MySQL->format_datetime($dt); | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 1 | 1; | |||||||||