ghostwriter/clock
Provides a Clock implementation for PHP
3.0.2
3.4M downloads/mo
#1644 most downloaded on Packagist
ghostwriter/clock
What this package is like to depend on
Last release 2 months ago
27 May 2026
Ships fairly regularly
a new release about every 6 months
Nearly every release is documented
notes for 6 of 6 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
6 releases · first in 2023
1 release in the last 12 months
see the full history below
Release timeline
6 releases · Sep 2023 to May 2026
2024
2025
2026
Releases
latest 6-
3.0.227 May 2026 -
3.0.105 Jan 2025 -
3.0.021 Jun 2024Release notes
Open source →What's Changed
- Class
Ghostwriter\Clock\Exception\CannotChangeTimezoneOfFrozenClockExceptionremoved - Class
Ghostwriter\Clock\Interface\ClockExceptionInterfaceremoved - Class
Ghostwriter\Clock\Trait\ClockTraitremoved - Method
Ghostwriter\Clock\Interface\ClockInterface::withDateTimeZone()removed - Method
Ghostwriter\Clock\Interface\ClockInterface::withSystemTimezone()removed - Method
Ghostwriter\Clock\Interface\ClockInterface::withTimezone()removed - Method
Ghostwriter\Clock\FrozenClock::withDateTimeZone()removed - Method
Ghostwriter\Clock\FrozenClock::withSystemTimezone()removed - Method
Ghostwriter\Clock\FrozenClock::withTimezone()removed - Method
Ghostwriter\Clock\LocalizedClock::withDateTimeZone()removed - Method
Ghostwriter\Clock\LocalizedClock::withSystemTimezone()removed - Method
Ghostwriter\Clock\LocalizedClock::withTimezone()removed - Method
Ghostwriter\Clock\SystemClock::withDateTimeZone()removed - Method
Ghostwriter\Clock\SystemClock::withSystemTimezone()removed - Method
Ghostwriter\Clock\SystemClock::withTimezone()removed
Full Changelog: 2.0.0...3.0.0
Release notes
Open source →Removed
- Class
Ghostwriter\Clock\Exception\CannotChangeTimezoneOfFrozenClockExceptionremoved - Class
Ghostwriter\Clock\Interface\ClockExceptionInterfaceremoved - Class
Ghostwriter\Clock\Trait\ClockTraitremoved - Method
Ghostwriter\Clock\Interface\ClockInterface::withDateTimeZone()removed - Method
Ghostwriter\Clock\Interface\ClockInterface::withSystemTimezone()removed - Method
Ghostwriter\Clock\Interface\ClockInterface::withTimezone()removed - Method
Ghostwriter\Clock\FrozenClock::withDateTimeZone()removed - Method
Ghostwriter\Clock\FrozenClock::withSystemTimezone()removed - Method
Ghostwriter\Clock\FrozenClock::withTimezone()removed - Method
Ghostwriter\Clock\LocalizedClock::withDateTimeZone()removed - Method
Ghostwriter\Clock\LocalizedClock::withSystemTimezone()removed - Method
Ghostwriter\Clock\LocalizedClock::withTimezone()removed - Method
Ghostwriter\Clock\SystemClock::withDateTimeZone()removed - Method
Ghostwriter\Clock\SystemClock::withSystemTimezone()removed - Method
Ghostwriter\Clock\SystemClock::withTimezone()removed
- Class
-
2.0.016 Dec 2023Release notes
Open source →Added
- Method
freeze()was added to interfaceGhostwriter\Clock\Interface\ClockInterface - Method
freeze()was added to interfaceGhostwriter\Clock\Interface\FrozenClockInterface - Method
freeze()was added to interfaceGhostwriter\Clock\Interface\LocalizedClockInterface - Method
freeze()was added to interfaceGhostwriter\Clock\Interface\SystemClockInterface - Method
new()was added to interfaceGhostwriter\Clock\Interface\FrozenClockInterface - Method
new()was added to interfaceGhostwriter\Clock\Interface\LocalizedClockInterface - Method
new()was added to interfaceGhostwriter\Clock\Interface\SystemClockInterface - Method
withDateTimeZone()was added to interfaceGhostwriter\Clock\Interface\ClockInterface - Method
withDateTimeZone()was added to interfaceGhostwriter\Clock\Interface\FrozenClockInterface - Method
withDateTimeZone()was added to interfaceGhostwriter\Clock\Interface\LocalizedClockInterface - Method
withDateTimeZone()was added to interfaceGhostwriter\Clock\Interface\SystemClockInterface - Method
withSystemTimezone()was added to interfaceGhostwriter\Clock\Interface\ClockInterface - Method
withSystemTimezone()was added to interfaceGhostwriter\Clock\Interface\FrozenClockInterface - Method
withSystemTimezone()was added to interfaceGhostwriter\Clock\Interface\LocalizedClockInterface - Method
withSystemTimezone()was added to interfaceGhostwriter\Clock\Interface\SystemClockInterface - Method
withTimezone()was added to interfaceGhostwriter\Clock\Interface\ClockInterface - Method
withTimezone()was added to interfaceGhostwriter\Clock\Interface\FrozenClockInterface - Method
withTimezone()was added to interfaceGhostwriter\Clock\Interface\LocalizedClockInterface - Method
withTimezone()was added to interfaceGhostwriter\Clock\Interface\SystemClockInterface
Changed
- Method
__construct()of classGhostwriter\Clock\FrozenClockvisibility reduced from public to private - Method
__construct()of classGhostwriter\Clock\LocalizedClockvisibility reduced from public to private - Method
freeze()of classGhostwriter\Clock\Trait\ClockTraitchanged from concrete to abstract - Method
now()of classGhostwriter\Clock\Trait\ClockTraitchanged from concrete to abstract - Method
withDateTimeZone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withDateTimeZone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withDateTimeZone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withDateTimeZone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withSystemTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withSystemTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withSystemTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withSystemTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - Method
withTimezone()of classGhostwriter\Clock\Trait\ClockTraitchanged scope from static to instance - The number of required arguments for
Ghostwriter\Clock\FrozenClock#__construct()increased from 0 to 1 - The number of required arguments for
Ghostwriter\Clock\LocalizedClock#__construct()increased from 0 to 1
Removed
- Class
Ghostwriter\Clock\Exception\UnsupportedClockExceptionhas been deleted - Method
Ghostwriter\Clock\FrozenClock#__construct()was removed - Method
Ghostwriter\Clock\LocalizedClock#__construct()was removed - Method
Ghostwriter\Clock\SystemClock::create()was removed
Full Changelog: 1.1.0...2.0.0
Release notes
Open source →Added
- Method freeze() was added to interface Ghostwriter\Clock\Interface\ClockInterface
- Method freeze() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
- Method freeze() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
- Method freeze() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
- Method new() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
- Method new() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
- Method new() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
- Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
- Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
- Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
- Method withDateTimeZone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
- Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
- Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
- Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
- Method withSystemTimezone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
- Method withTimezone() was added to interface Ghostwriter\Clock\Interface\ClockInterface
- Method withTimezone() was added to interface Ghostwriter\Clock\Interface\FrozenClockInterface
- Method withTimezone() was added to interface Ghostwriter\Clock\Interface\LocalizedClockInterface
- Method withTimezone() was added to interface Ghostwriter\Clock\Interface\SystemClockInterface
Changed
- Method __construct() of class Ghostwriter\Clock\FrozenClock visibility reduced from public to private
- Method __construct() of class Ghostwriter\Clock\LocalizedClock visibility reduced from public to private
- Method freeze() of class Ghostwriter\Clock\Trait\ClockTrait changed from concrete to abstract
- Method now() of class Ghostwriter\Clock\Trait\ClockTrait changed from concrete to abstract
- Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withDateTimeZone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withSystemTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- Method withTimezone() of class Ghostwriter\Clock\Trait\ClockTrait changed scope from static to instance
- The number of required arguments for Ghostwriter\Clock\FrozenClock#__construct() increased from 0 to 1
- The number of required arguments for Ghostwriter\Clock\LocalizedClock#__construct() increased from 0 to 1
Removed
- Class Ghostwriter\Clock\Exception\UnsupportedClockException has been deleted
- Method Ghostwriter\Clock\FrozenClock#__construct() was removed
- Method Ghostwriter\Clock\LocalizedClock#__construct() was removed
- Method Ghostwriter\Clock\SystemClock::create() was removed
- Method
-
1.1.029 Sep 2023 -
1.0.029 Sep 2023