]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Fixed bug for pgsql in job elasped time calculation
authorDavide Franco <bacula-dev@dflc.ch>
Sun, 24 Jul 2011 07:46:03 +0000 (09:46 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:27 +0000 (14:49 +0200)
gui/bacula-web/includes/utils/ctimeutils.class.php

index 381148fff4510d154fd31a788299e5156c356d18..3782acbc0ebf81f6f73d74f0528d5c99e89c2c83 100644 (file)
@@ -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;