调整统计表

dev
vine_liutk 2022-11-11 16:04:42 +08:00
parent 77305ff643
commit 63d6575268
1 changed files with 3 additions and 1 deletions

View File

@ -245,7 +245,9 @@ class DeviceController extends Controller
$xKeys[] =(clone $startDay)->addDays($i)->startOfDay()->format('Y-m-d H:i:s');
}
}else{
for ($i = 0; $i < 24; $i++) {
//调整截至到当前小时
$h = date('h');
for ($i = 0; $i < ($h+1); $i++) {
$xKeys[] = date('Y-m-d').' '.str_pad($i, 2, '0', STR_PAD_LEFT).':00:00';
}
}