- Replaced 86400 values by LAST_DAY constant in bweb.inc.php, bgraph.inc.php and index.php
$this->StartDate = "1900-01-01";
$this->EndDate = "4000-01-01";
- $this->elapsed = "86400"; // 24 hours in seconds.
+ $this->elapsed = LAST_DAY; // 24 hours in seconds.
}
$total_elapsed += $time['elapsed'];
}
// Verify if elapsed time is more than 1 day
- if ( $total_elapsed > 86400 ) {
+ if ( $total_elapsed > LAST_DAY ) {
return date("%d days H:i:s", $total_elapsed );
}else {
return date("H:i:s", $total_elapsed );
// Get the last 7 days interval (start and end)
for( $c = 6 ; $c >= 0 ; $c-- ) {
- $today = ( mktime() - ($c * 86400) );
+ $today = ( mktime() - ($c * LAST_DAY) );
array_push( $days, array( 'start' => date( "Y-m-d 00:00:00", $today ), 'end' => date( "Y-m-d 23:59:00", $today ) ) );
}