ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ClockFactoryImpl.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Data\Clock;
22
23use DateTimeZone;
24
26{
30 public function system(): ClockInterface
31 {
32 return new SystemClock();
33 }
34
38 public function utc(): ClockInterface
39 {
40 return new UtcClock();
41 }
42
46 public function local(DateTimeZone $time_zone): ClockInterface
47 {
48 return new LocalClock($time_zone);
49 }
50}
local(DateTimeZone $time_zone)
@inheritDoc