]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: Renamed timeutils.class.php -> ctimeutils.class.php
authorDavide Franco <bacula-dev@dflc.ch>
Fri, 24 Jun 2011 13:49:13 +0000 (15:49 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:14 +0000 (14:49 +0200)
gui/bacula-web/includes/utils/ctimeutils.class.php [new file with mode: 0644]
gui/bacula-web/includes/utils/timeutils.class.php [deleted file]

diff --git a/gui/bacula-web/includes/utils/ctimeutils.class.php b/gui/bacula-web/includes/utils/ctimeutils.class.php
new file mode 100644 (file)
index 0000000..cd3b13a
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/* 
++-------------------------------------------------------------------------+
+| Copyright 2010-2011, Davide Franco                                             |
+|                                                                         |
+| This program is free software; you can redistribute it and/or           |
+| modify it under the terms of the GNU General Public License             |
+| as published by the Free Software Foundation; either version 2          |
+| of the License, or (at your option) any later version.                  |
+|                                                                         |
+| This program is distributed in the hope that it will be useful,         |
+| but WITHOUT ANY WARRANTY; without even the implied warranty of          |
+| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
+| GNU General Public License for more details.                            |
++-------------------------------------------------------------------------+ 
+*/
+
+class TimeUtils {
+       static public function Get_Elapsed_Time( $start_time, $end_time)
+       {
+               $start = '';
+               $end   = '';
+               
+               if( $start_time == '0000-00-00 00:00:00' )
+                       return 'N/A';
+               else
+                       $start = strtotime( $start_time );                                      
+        
+               if( $end_time == '0000-00-00 00:00:00' )
+                       $end = mktime();
+               else
+                       $end   = strtotime( $end_time );
+               
+               $diff = $end - $start;
+
+        $daysDiff = sprintf("%02d", floor($diff/60/60/24) );
+        $diff -= $daysDiff*60*60*24;
+
+        $hrsDiff = sprintf("%02d", floor($diff/60/60) );
+        $diff -= $hrsDiff*60*60;
+
+        $minsDiff = sprintf("%02d", floor($diff/60) );
+        $diff -= $minsDiff*60;
+        $secsDiff = sprintf("%02d", $diff );
+
+        if( $daysDiff > 0 )
+                       return $daysDiff . 'day(s) ' . $hrsDiff.':' . $minsDiff . ':' . $secsDiff;
+        else
+                       return $hrsDiff . ':' . $minsDiff . ':' . $secsDiff;
+       }
+}
+
+?>
diff --git a/gui/bacula-web/includes/utils/timeutils.class.php b/gui/bacula-web/includes/utils/timeutils.class.php
deleted file mode 100644 (file)
index cd3b13a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-/* 
-+-------------------------------------------------------------------------+
-| Copyright 2010-2011, Davide Franco                                             |
-|                                                                         |
-| This program is free software; you can redistribute it and/or           |
-| modify it under the terms of the GNU General Public License             |
-| as published by the Free Software Foundation; either version 2          |
-| of the License, or (at your option) any later version.                  |
-|                                                                         |
-| This program is distributed in the hope that it will be useful,         |
-| but WITHOUT ANY WARRANTY; without even the implied warranty of          |
-| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           |
-| GNU General Public License for more details.                            |
-+-------------------------------------------------------------------------+ 
-*/
-
-class TimeUtils {
-       static public function Get_Elapsed_Time( $start_time, $end_time)
-       {
-               $start = '';
-               $end   = '';
-               
-               if( $start_time == '0000-00-00 00:00:00' )
-                       return 'N/A';
-               else
-                       $start = strtotime( $start_time );                                      
-        
-               if( $end_time == '0000-00-00 00:00:00' )
-                       $end = mktime();
-               else
-                       $end   = strtotime( $end_time );
-               
-               $diff = $end - $start;
-
-        $daysDiff = sprintf("%02d", floor($diff/60/60/24) );
-        $diff -= $daysDiff*60*60*24;
-
-        $hrsDiff = sprintf("%02d", floor($diff/60/60) );
-        $diff -= $hrsDiff*60*60;
-
-        $minsDiff = sprintf("%02d", floor($diff/60) );
-        $diff -= $minsDiff*60;
-        $secsDiff = sprintf("%02d", $diff );
-
-        if( $daysDiff > 0 )
-                       return $daysDiff . 'day(s) ' . $hrsDiff.':' . $minsDiff . ':' . $secsDiff;
-        else
-                       return $hrsDiff . ':' . $minsDiff . ':' . $secsDiff;
-       }
-}
-
-?>