PHPackages                             phpsoftbox/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. phpsoftbox/clock

ActiveLibrary

phpsoftbox/clock
================

Clock utilities for PhpSoftBox (PSR-20 + frozen time)

022↓100%PHP

Since Mar 5Pushed 2w agoCompare

[ Source](https://github.com/phpsoftbox/clock)[ Packagist](https://packagist.org/packages/phpsoftbox/clock)[ RSS](/packages/phpsoftbox-clock/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Clock
=====

[](#clock)

Минимальный PSR-20 совместимый компонент времени.

Использование
-------------

[](#использование)

```
use PhpSoftBox\Clock\Clock;

$now = Clock::now();
```

Фиксация времени (тесты)
------------------------

[](#фиксация-времени-тесты)

```
use PhpSoftBox\Clock\Clock;

Clock::freeze(new \DateTimeImmutable('2026-02-27 00:00:00'));
// ... тесты
Clock::reset();
```

Путешествие во времени (тесты)
------------------------------

[](#путешествие-во-времени-тесты)

```
use PhpSoftBox\Clock\Clock;

Clock::freeze(new \DateTimeImmutable('2026-02-27 00:00:00'));
Clock::travel(60); // +60 секунд
Clock::travel('+1 hour'); // или строкой
Clock::reset();
```

DatePoint
---------

[](#datepoint)

`DatePoint` — value object, реализует `DateTimeInterface` и создаётся от `Clock::now()`:

```
use PhpSoftBox\Clock\DatePoint;

$createdAt = new DatePoint();
```

###  Health Score

23

—

LowBetter than 30% of packages

Maintenance63

Regular maintenance activity

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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