mirror of
https://github.com/beste/clock.git
synced 2026-08-17 17:47:13 +00:00
15 lines
337 B
PHP
15 lines
337 B
PHP
<?php
|
|
|
|
require __DIR__.'/../vendor/autoload.php';
|
|
|
|
use Beste\Clock\UTCClock;
|
|
|
|
$clock = UTCClock::create();
|
|
|
|
$anotherTimeZone = 'Africa/Casablanca';
|
|
|
|
date_default_timezone_set($anotherTimeZone);
|
|
|
|
printf("The system time zone is %s.\n", $anotherTimeZone);
|
|
printf("The clock's time zone is %s.\n", $clock->now()->getTimezone()->getName());
|