Phalcon time
NOTE
All classes are prefixed with Phalcon
Time\Clock\ClockInterface¶
Interface Source on GitHub
Phalcon\Time\Clock\ClockInterface
Uses DateTimeImmutable
Method Summary¶
Methods¶
Public · 1
now()¶
Time\Clock\Exception¶
Class Source on GitHub
\ExceptionPhalcon\Time\Clock\Exception
Time\Clock\Exceptions\InvalidModifier¶
Class Source on GitHub
\ExceptionPhalcon\Time\Clock\ExceptionPhalcon\Time\Clock\Exceptions\InvalidModifier
Uses Phalcon\Time\Clock\Exception · Throwable
Method Summary¶
Methods¶
Public · 1
__construct()¶
Time\Clock\FrozenClock¶
Final Source on GitHub
Phalcon\Time\Clock\FrozenClock- implementsPhalcon\Time\Clock\ClockInterface
Uses DateTimeImmutable · DateTimeZone · Phalcon\Time\Clock\Exceptions\InvalidModifier · Throwable
Method Summary¶
public
__construct( DateTimeImmutable $now )
public
static
adjust( string $modifier )
Mutates the clock to a new value. All consumers receive the same modification
public
FrozenClock
fromSystemTimezone()
Return a new object of now with the current timezone
public
FrozenClock
fromUTC()
Return a new object of now with UTC
public
DateTimeImmutable
now()
Return the current clock
public
static
set( DateTimeImmutable $now )
Sets the clock to a new value. All consumers receive the same modification
Methods¶
Public · 6
__construct()¶
adjust()¶
Mutates the clock to a new value. All consumers receive the same modification
fromSystemTimezone()¶
Return a new object of now with the current timezone
fromUTC()¶
Return a new object of now with UTC
now()¶
Return the current clock
set()¶
Sets the clock to a new value. All consumers receive the same modification
Time\Clock\SystemClock¶
Final Source on GitHub
Phalcon\Time\Clock\SystemClock- implementsPhalcon\Time\Clock\ClockInterface
Uses DateTimeImmutable · DateTimeZone
Method Summary¶
public
__construct( DateTimeZone $timezone )
public
SystemClock
fromSystemTimezone()
Return a new object of now with the current timezone
public
SystemClock
fromUTC()
Return a new object of now with UTC
public
DateTimeImmutable
now()
Return the current clock
Methods¶
Public · 4
__construct()¶
fromSystemTimezone()¶
Return a new object of now with the current timezone
fromUTC()¶
Return a new object of now with UTC
now()¶
Return the current clock