This commit is contained in:
hashbro
2026-09-17 00:25:39 +08:00
parent a49fb2415d
commit 2d18331feb
13 changed files with 475 additions and 91 deletions
+8 -2
View File
@@ -198,9 +198,15 @@ class AnalyticsReportTest extends TestCase
'ios_version' => '18.5',
'has_wallet' => Device::WALLET_NONE,
]);
$aliveEnd = now();
$aliveStart = $aliveEnd->copy()->subHours(2);
if ($aliveStart->lt($aliveEnd->copy()->startOfDay())) {
$aliveStart = $aliveEnd->copy()->startOfDay();
$aliveEnd = $aliveStart->copy()->addHours(2);
}
DB::table('devices')->where('id', $alive->id)->update([
'created_at' => now()->subHours(2),
'updated_at' => now(),
'created_at' => $aliveStart,
'updated_at' => $aliveEnd,
]);
DB::table('devices')->where('id', $short->id)->update([
'created_at' => now(),