/dev/null')); } if ($timezone === '') { $timezone = 'UTC'; } $now = Carbon::create(2026, 2, 2, 1, 0, 0, $timezone); Carbon::setTestNow($now); $schedule = new BackupSchedule([ 'frequency' => 'daily', 'time' => '02:00', 'is_active' => true, ]); $nextRun = $schedule->calculateNextRun(); $expectedLocal = $now->copy()->setTime(2, 0, 0); if ($expectedLocal->isPast()) { $expectedLocal->addDay(); } $expectedUtc = $expectedLocal->copy()->setTimezone('UTC'); $this->assertSame($expectedUtc->timestamp, $nextRun->timestamp); } }