diff options
| author | ivan <ivan> | 2011-01-31 02:00:17 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2011-01-31 02:00:17 +0000 | 
| commit | 9ce4a6639a0ac007151c213efab6265c806141f5 (patch) | |
| tree | 7f5203c1f123caaa6600dbfeccaf0b8b78a17ee0 | |
| parent | 6e79acda564ac84f76ea67e21bdcb962f774c24b (diff) | |
fix what i broke for Pg, RT#10574
| -rw-r--r-- | FS/FS/svc_port.pm | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/FS/FS/svc_port.pm b/FS/FS/svc_port.pm index 33de08d81..befe8ca46 100644 --- a/FS/FS/svc_port.pm +++ b/FS/FS/svc_port.pm @@ -3,8 +3,9 @@ package FS::svc_port;  use strict;  use vars qw($conf $system $DEBUG $me );  use base qw( FS::svc_Common ); -use FS::Record qw( qsearch qsearchs dbh -                   str2time_sql str2time_sql_closing concat_sql ); #dbh +use FS::UID qw( driver_name ); +use FS::Record qw( qsearch qsearchs +                   str2time_sql str2time_sql_closing concat_sql );  use FS::cust_svc;  use GD::Graph;  use GD::Graph::mixed; @@ -256,8 +257,9 @@ sub graph_png {              || $end <= $start || $end < 0 || $end > $now || $start > $now              || $end-$start > 86400*366 ); -        my $_date = str2time_sql. concat_sql([ 'srv_date', "' '", 'srv_time' ]). -                    str2time_sql_closing; +        my $_date = concat_sql([ 'srv_date', "' '", 'srv_time' ]); +        $_date = "CAST( $_date AS TIMESTAMP )" if driver_name =~ /^Pg/i; +        $_date = str2time_sql. $_date.  str2time_sql_closing;          my $serviceid_sql = "('${serviceid}_IN','${serviceid}_OUT')"; | 
