Enable more than 24 hours in timed statistics

This commit is contained in:
Brian Miyaji
2016-12-21 13:23:07 +11:00
parent f1c5657a83
commit 6ad7e6ed2c
4 changed files with 5 additions and 5 deletions

View File

@@ -422,7 +422,7 @@ class SP_Meta_Box_Event_Performance {
<?php <?php
$intval = intval( $value ); $intval = intval( $value );
$timeval = gmdate( 'i:s', $intval ); $timeval = gmdate( 'i:s', $intval );
$hours = gmdate( 'H', $intval ); $hours = floor( $intval / 3600 );
if ( '00' != $hours ) if ( '00' != $hours )
$timeval = $hours . ':' . $timeval; $timeval = $hours . ':' . $timeval;

View File

@@ -195,7 +195,7 @@ class SP_Meta_Box_Player_Statistics {
// Convert value // Convert value
$intval = intval( $value ); $intval = intval( $value );
$timeval = gmdate( 'i:s', $intval ); $timeval = gmdate( 'i:s', $intval );
$hours = gmdate( 'H', $intval ); $hours = floor( $intval / 3600 );
if ( '00' != $hours ) if ( '00' != $hours )
$timeval = $hours . ':' . $timeval; $timeval = $hours . ':' . $timeval;
@@ -205,7 +205,7 @@ class SP_Meta_Box_Player_Statistics {
// Convert placeholder // Convert placeholder
$intval = intval( $placeholder ); $intval = intval( $placeholder );
$placeholder = gmdate( 'i:s', $intval ); $placeholder = gmdate( 'i:s', $intval );
$hours = gmdate( 'H', $intval ); $hours = floor( $intval / 3600 );
if ( '00' != $hours ) if ( '00' != $hours )
$placeholder = $hours . ':' . $placeholder; $placeholder = $hours . ':' . $placeholder;

View File

@@ -221,7 +221,7 @@ class SP_Event extends SP_Custom_Post{
$intval = intval( $performance_value ); $intval = intval( $performance_value );
$timeval = gmdate( 'i:s', $intval ); $timeval = gmdate( 'i:s', $intval );
$hours = gmdate( 'H', $intval ); $hours = floor( $intval / 3600 );
if ( '00' != $hours ) if ( '00' != $hours )
$timeval = $hours . ':' . $timeval; $timeval = $hours . ':' . $timeval;

View File

@@ -698,7 +698,7 @@ class SP_Player extends SP_Custom_Post {
$intval = intval( $performance_value ); $intval = intval( $performance_value );
$timeval = gmdate( 'i:s', $intval ); $timeval = gmdate( 'i:s', $intval );
$hours = gmdate( 'H', $intval ); $hours = floor( $intval / 3600 );
if ( '00' != $hours ) if ( '00' != $hours )
$timeval = $hours . ':' . $timeval; $timeval = $hours . ':' . $timeval;