ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Data\Clock\LocalClock Class Reference
+ Inheritance diagram for ILIAS\Data\Clock\LocalClock:
+ Collaboration diagram for ILIAS\Data\Clock\LocalClock:

Public Member Functions

 __construct (DateTimeZone $time_zone)
 
 now ()
 

Private Attributes

DateTimeZone $time_zone
 

Detailed Description

Definition at line 24 of file LocalClock.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Data\Clock\LocalClock::__construct ( DateTimeZone  $time_zone)

Definition at line 28 of file LocalClock.php.

References ILIAS\Data\Clock\LocalClock\$time_zone.

29  {
30  $this->time_zone = $time_zone;
31  }

Member Function Documentation

◆ now()

ILIAS\Data\Clock\LocalClock::now ( )

Implements ILIAS\Data\Clock\ClockInterface.

Definition at line 33 of file LocalClock.php.

34  {
35  return new DateTimeImmutable('now', $this->time_zone);
36  }

Field Documentation

◆ $time_zone

DateTimeZone ILIAS\Data\Clock\LocalClock::$time_zone
private

Definition at line 26 of file LocalClock.php.

Referenced by ILIAS\Data\Clock\LocalClock\__construct().


The documentation for this class was generated from the following file: