From ba8b103330fcaa1b415eff093f5ac3d0963b62cb Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Sun, 24 Jul 2011 09:46:03 +0200 Subject: [PATCH] bacula-web: Fixed bug for pgsql in job elasped time calculation --- gui/bacula-web/includes/utils/ctimeutils.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.39.5