mirror of
https://github.com/beste/clock.git
synced 2026-08-17 17:47:13 +00:00
Initial Release
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?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());
|
||||
Reference in New Issue
Block a user