add services logic
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\Services\System;
|
||||
|
||||
use App\Services\System\TimeService;
|
||||
use Tests\TestCase;
|
||||
|
||||
class TimeServiceTest extends TestCase
|
||||
{
|
||||
public function test_to_utc_and_to_local_round_trip(): void
|
||||
{
|
||||
$service = new TimeService();
|
||||
$utc = $service->toUtc('2025-01-01 12:00:00', 'America/New_York');
|
||||
$local = $service->toLocal($utc, 'UTC', 'America/New_York');
|
||||
|
||||
$this->assertSame('2025-01-01 12:00:00', $local);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user