eventsauce/clock
Simple clock abstraction for PHP. Use SystemClock in production and TestClock in tests to control time deterministically. Get now() as DateTimeImmutable, access timeZone(), move time forward, tick to system time, or fixate to a specific moment.
eventsauce/clock is a small PHP component that standardizes how your app reads time via a Clock interface, making time-dependent code cleaner and far easier to test. Swap implementations based on environment: use SystemClock in production and TestClock in tests.
EventSauce\Clock\Clock interface returning DateTimeImmutableHow can I help you explore Laravel packages today?