Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Clock Laravel Package

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.

View on GitHub
Deep Wiki
Context7

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.

  • Provides a simple EventSauce\Clock\Clock interface returning DateTimeImmutable
  • SystemClock reads real system time (optional timezone support)
  • TestClock offers deterministic time for reliable tests
  • Control time in tests: moveForward(), tick() to sync to system now
  • fixate() to pin the clock to a specific date/time for repeatable scenarios
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport