Phalcon time
NOTE
All classes are prefixed with Phalcon
Time\Clock\ClockInterface¶
Interface Source on GitHub
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
Phalcon\Time\Clock\ClockInterface
Uses DateTimeImmutable
Method Summary¶
Methods¶
now()¶
Time\Clock\Exception¶
Class Source on GitHub
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
\ExceptionPhalcon\Time\Clock\Exception
Time\Clock\Exceptions\InvalidModifier¶
Class Source on GitHub
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
\ExceptionPhalcon\Time\Clock\ExceptionPhalcon\Time\Clock\Exceptions\InvalidModifier
Uses Phalcon\Time\Clock\Exception · Throwable
Method Summary¶
Methods¶
__construct()¶
Time\Clock\FrozenClock¶
Final Source on GitHub
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
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¶
__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
This file is part of the Phalcon Framework.
(c) Phalcon Team team@phalcon.io
For the full copyright and license information, please view the LICENSE.txt file that was distributed with this source code.
Implementation of this file has been influenced by lcobucci/clock
@link https://github.com/lcobucci/clock @license https://github.com/lcobucci/clock/blob/3.7.x/LICENSE
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¶
__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