ILIAS  release_8 Revision v8.24
ClockFactoryImpl.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5/******************************************************************************
6 *
7 * This file is part of ILIAS, a powerful learning management system.
8 *
9 * ILIAS is licensed with the GPL-3.0, you should have received a copy
10 * of said license along with the source code.
11 *
12 * If this is not the case or you just want to try ILIAS, you'll find
13 * us at:
14 * https://www.ilias.de
15 * https://github.com/ILIAS-eLearning
16 *
17 *****************************************************************************/
18
19namespace ILIAS\Data\Clock;
20
21use DateTimeZone;
22
24{
28 public function system(): ClockInterface
29 {
30 return new SystemClock();
31 }
32
36 public function utc(): ClockInterface
37 {
38 return new UtcClock();
39 }
40
44 public function local(DateTimeZone $time_zone): ClockInterface
45 {
46 return new LocalClock($time_zone);
47 }
48}
local(DateTimeZone $time_zone)
@inheritDoc