Fix reports by using strings - int's have a max. Closes #4904

This commit is contained in:
Mike Jolley 2014-02-28 14:51:37 +00:00 committed by Coen Jacobs
parent 7c4c8f50ea
commit 508854effe
1 changed files with 5 additions and 5 deletions

View File

@ -274,10 +274,10 @@ class WC_Admin_Report {
for ( $i = 0; $i <= $interval; $i ++ ) { for ( $i = 0; $i <= $interval; $i ++ ) {
switch ( $group_by ) { switch ( $group_by ) {
case 'day' : case 'day' :
$time = strtotime( date( 'Ymd', strtotime( "+{$i} DAY", $start_date ) ) ) * 1000; $time = strtotime( date( 'Ymd', strtotime( "+{$i} DAY", $start_date ) ) ) . '000';
break; break;
case 'month' : case 'month' :
$time = strtotime( date( 'Ym', strtotime( "+{$i} MONTH", $start_date ) ) . '01' ) * 1000; $time = strtotime( date( 'Ym', strtotime( "+{$i} MONTH", $start_date ) ) . '01' ) . '000';
break; break;
} }
@ -288,10 +288,10 @@ class WC_Admin_Report {
foreach ( $data as $d ) { foreach ( $data as $d ) {
switch ( $group_by ) { switch ( $group_by ) {
case 'day' : case 'day' :
$time = strtotime( date( 'Ymd', strtotime( $d->$date_key ) ) ) * 1000; $time = strtotime( date( 'Ymd', strtotime( $d->$date_key ) ) ) . '000';
break; break;
case 'month' : case 'month' :
$time = strtotime( date( 'Ym', strtotime( $d->$date_key ) ) . '01' ) * 1000; $time = strtotime( date( 'Ym', strtotime( $d->$date_key ) ) . '01' ) . '000';
break; break;
} }