PHPackages                             jitesoft/clock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jitesoft/clock

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jitesoft/clock
==============

PSR-20 clock implementation.

1.0.0(2y ago)07MITPHP

Since Jul 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/jitesoft/php-clock)[ Packagist](https://packagist.org/packages/jitesoft/clock)[ GitHub Sponsors](https://github.com/jitesoft)[ Fund](https://opencollective.com/jitesoft-open-source)[ RSS](/packages/jitesoft-clock/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Clock
=====

[](#clock)

Implementation of the [PSR-20](https://www.php-fig.org/psr/psr-20/) interface for Clock in php.

Why
---

[](#why)

When working with time in php, it's common to either create a new DateTime (or preferably DateTimeImmutable) object or to use the `time()` function.
This makes testing a bit hard, seeing you would have to mock the `time` global function (which can be a pain) or do some black magick to fake the DateTimeImmutable class.

What more?
----------

[](#what-more)

In the first implementation of this package, the only thing implemented is the `now` function, which returns a `DateTimeImmutable` object.
In the future, more functionality might be added.

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1027d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/320d3f8628cc6f5e60b96e9af6b2e4d6220426cb9723193fd50a88758ffb8f97?d=identicon)[Johannestegner](/maintainers/Johannestegner)

---

Top Contributors

[![Johannestegner](https://avatars.githubusercontent.com/u/2530181?v=4)](https://github.com/Johannestegner "Johannestegner (2 commits)")

### Embed Badge

![Health badge](/badges/jitesoft-clock/health.svg)

```
[![Health](https://phpackages.com/badges/jitesoft-clock/health.svg)](https://phpackages.com/packages/jitesoft-clock)
```

###  Alternatives

[lcobucci/clock

Yet another clock abstraction

790190.9M114](/packages/lcobucci-clock)[symfony/clock

Decouples applications from the system clock

430168.9M205](/packages/symfony-clock)[eventsauce/eventsauce

A pragmatic event sourcing library for PHP with a focus on developer experience.

8632.1M47](/packages/eventsauce-eventsauce)[ecotone/ecotone

Supporting you in building DDD, CQRS, Event Sourcing applications with ease.

558549.8k17](/packages/ecotone-ecotone)[mcp/sdk

Model Context Protocol SDK for Client and Server applications in PHP

1.4k423.9k30](/packages/mcp-sdk)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
