From: Davide Franco Date: Sun, 24 Jul 2011 07:46:03 +0000 (+0200) Subject: bacula-web: Fixed bug for pgsql in job elasped time calculation X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ba8b103330fcaa1b415eff093f5ac3d0963b62cb;p=bacula%2Fbacula bacula-web: Fixed bug for pgsql in job elasped time calculation --- diff --git a/gui/bacula-web/includes/utils/ctimeutils.class.php b/gui/bacula-web/includes/utils/ctimeutils.class.php index 381148fff4..3782acbc0e 100644 --- a/gui/bacula-web/includes/utils/ctimeutils.class.php +++ b/gui/bacula-web/includes/utils/ctimeutils.class.php @@ -21,15 +21,15 @@ class CTimeUtils { $start = ''; $end = ''; - if( $start_time == '0000-00-00 00:00:00' ) + if( $start_time == '0000-00-00 00:00:00' or is_null($start_time) ) return 'N/A'; else $start = strtotime( $start_time ); - if( $end_time == '0000-00-00 00:00:00' ) + if( $end_time == '0000-00-00 00:00:00' or is_null($end_time) ) $end = mktime(); else - $end = strtotime( $end_time ); + $end = strtotime( $end_time ); $diff = $end - $start;