Clock
The Clock Component is a wrapper around PHP's native DateTime objects and functions. Using the Clock Component helps you test and keep everything a standard timezone
Installation
Usage
SystemClock
The SystemClock
is generally used in production. If you need check timestamps or manage dates and times, this is the Clock you want to use. Use Dependency Injection to make it easy to test with.
FixedClock
The FixedClock
is used for testing. Just set the time and inject into your class.
Last updated