thesis / clock
Thesis Clock
Fund package maintenance!
www.tinkoff.ru/cf/5MqZQas2dk7
0.1.0
2025-05-09 14:33 UTC
Requires
- php: ^8.3
- psr/clock: ^1.0
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8.2
- phpunit/phpunit: ^12.1.4
- symfony/var-dumper: ^6.4.15 || ^7.2.6
README
Installation
composer require thesis/clock
Usage
WallClock
is a basic implementation of the Psr\Clock\ClockInterface
that returns the current wall-clock time.
use Thesis\Time\WallClock; $clock = new WallClock(); echo $clock->now()->format('c'); // Outputs current time in ISO 8601 format
Or with a specific timezone:
$clock = new WallClock(new DateTimeZone('Europe/Moscow')); echo $clock->now()->format('c'); // Outputs Moscow time in ISO 8601 format