Fix reports by using strings - int's have a max. Closes #4904
This commit is contained in:
parent
7c4c8f50ea
commit
508854effe
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue