SystemClock
Class
implements
ClockInterface
Read only:
Yes
Final:
Yes
Provides the current system time in a predictable timezone.
Interfaces
Properties
: DateTimeZone|null
Methods
__construct()
: mixed
Creates a new system clock.
now()
: DateTimeImmutable
Returns the current date-time.
Creates a new system clock.
public
__construct([DateTimeZone|string|null
$timezone = null]) : mixed
Parameters
$timezone
:
DateTimeZone|string|null
=
null
Description
the timezone that SHOULD be used by this clock
Returns the current date-time.
public
now() : DateTimeImmutable
Return values
DateTimeImmutable