X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_svc.pm;h=b97539681d7643a9cc0506e4d10a5a2e2fa96064;hp=0d8a121147e8a736b96a1b87535145b78c64eca2;hb=8ce96f4accb45f2577d38de81b9f96c0031a2f8a;hpb=4060bc129c8b4e2ea1b699b48fb8bf69608c4b0c diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm index 0d8a12114..b97539681 100644 --- a/FS/FS/cust_svc.pm +++ b/FS/FS/cust_svc.pm @@ -380,7 +380,7 @@ sub seconds_since_sqlradacct { #select a unix time conversion function based on database type my $str2time; - if ( $dbh->{Driver}->{Name} eq 'mysql' ) { + if ( $dbh->{Driver}->{Name} =~ /^mysql(PP)?$/ ) { $str2time = 'UNIX_TIMESTAMP('; } elsif ( $dbh->{Driver}->{Name} eq 'Pg' ) { $str2time = 'EXTRACT( EPOCH FROM '; @@ -498,7 +498,7 @@ sub attribute_since_sqlradacct { #select a unix time conversion function based on database type my $str2time; - if ( $dbh->{Driver}->{Name} eq 'mysql' ) { + if ( $dbh->{Driver}->{Name} =~ /^mysql(PP)?$/ ) { $str2time = 'UNIX_TIMESTAMP('; } elsif ( $dbh->{Driver}->{Name} eq 'Pg' ) { $str2time = 'EXTRACT( EPOCH FROM '; @@ -561,7 +561,7 @@ sub get_session_history { #select a unix time conversion function based on database type my $str2time; - if ( $dbh->{Driver}->{Name} eq 'mysql' ) { + if ( $dbh->{Driver}->{Name} =~ /^mysql(PP)?$/ ) { $str2time = 'UNIX_TIMESTAMP('; } elsif ( $dbh->{Driver}->{Name} eq 'Pg' ) { $str2time = 'EXTRACT( EPOCH FROM ';