]> git.sur5r.net Git - bacula/bacula/commitdiff
bacula-web: New function get_Day_Intervals()
authorDavide Franco <bacula-dev@dflc.ch>
Wed, 6 Jul 2011 18:48:11 +0000 (20:48 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:20 +0000 (14:49 +0200)
 - return unix timestamp interval for a day

gui/bacula-web/includes/utils/ctimeutils.class.php

index 9843c169e22117c197c95daa059dd77c7e06081c..594d1d7f33b39cc8734f4ed6de59e324de8b7ab1 100644 (file)
@@ -48,6 +48,14 @@ class CTimeUtils {
         else
                        return $hrsDiff . ':' . $minsDiff . ':' . $secsDiff;
        }
+       
+       static public function get_Day_Intervals( $day )
+       {
+               $start                  = strtotime( date( "Y-m-d 00:00:00", $day) );
+               $end                    = strtotime( date( "Y-m-d 23:59:59", $day) );
+               
+               return array( 'start' => $start, 'end' => $end);
+       }
 }
 
 ?>