NativeClock
in package
implements
ClockInterface
FinalYes
A clock that relies the system time.
Tags
Table of Contents
Interfaces
Properties
- $timezone : DateTimeZone
Methods
- __construct() : mixed
- now() : DatePoint
- Returns the current time as a DateTimeImmutable Object
- sleep() : void
- withTimeZone() : static
Properties
$timezone
private
DateTimeZone
$timezone
Methods
__construct()
public
__construct([DateTimeZone|string|null $timezone = null ]) : mixed
Parameters
- $timezone : DateTimeZone|string|null = null
Tags
now()
Returns the current time as a DateTimeImmutable Object
public
now() : DatePoint
Return values
DatePointsleep()
public
sleep(float|int $seconds) : void
Parameters
- $seconds : float|int
withTimeZone()
public
withTimeZone(DateTimeZone|string $timezone) : static
Parameters
- $timezone : DateTimeZone|string