MT#5083 Fix fax_journal timestamp format

mr3.2.1
Andreas Granig 12 years ago
parent 423e675819
commit 1a5bc5b3ba
Notes: Jenkins User 9 years ago
jenkins_trigger: false

@ -30,7 +30,7 @@ sub add_columns {
sub _inflate_to_datetime {
my( $self, $value, $info, @rest ) = @_;
return $self->next::method( $value, $info, @rest )
unless $info->{ data_type } eq "varchar"
unless $info->{ data_type } eq "varchar" || $info->{ data_type } eq "integer"
|| (exists $info->{ inflate_datetime }
&& $info->{ inflate_datetime } eq 'epoch_string');
my $tz = DateTime::TimeZone->new( name => 'local' );

@ -4,7 +4,11 @@ use parent 'DBIx::Class::Core';
our $VERSION = '2.007';
__PACKAGE__->load_components("InflateColumn::DateTime", "Helper::Row::ToJSON");
__PACKAGE__->load_components(
"InflateColumn::DateTime",
"Helper::Row::ToJSON",
"+NGCP::Schema::InflateColumn::DateTime::EpochString",
);
__PACKAGE__->table("kamailio.fax_journal");
@ -29,6 +33,7 @@ __PACKAGE__->add_columns(
default_value => 0,
extra => { unsigned => 1 },
is_nullable => 0,
inflate_datetime => 'epoch_string',
},
"duration",
{

Loading…
Cancel
Save