19 lines
464 B
PHP
19 lines
464 B
PHP
<?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);
|
|
}
|
|
}
|