PHPackages                             nigelhough/php-time-source - 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. nigelhough/php-time-source

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

nigelhough/php-time-source
==========================

A source of time in PHP

0.0.1(3y ago)1141MITPHPPHP ^7.3 || ^7.4 || ^8.0 || ^8.1

Since Jun 4Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nigelhough/php-time-source)[ Packagist](https://packagist.org/packages/nigelhough/php-time-source)[ RSS](/packages/nigelhough-php-time-source/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (1)

PHP Time Source
===============

[](#php-time-source)

A library to abstract the source of time data within a PHP application.

An interface is provided that can be used in classes that depend on time.

### Use Cases

[](#use-cases)

A time source makes classes more testable by having a predictable and mockable time source.

In applications that use the time source consistently you can also do powerful things with mocking dates by setting a fixed date for integration or behavioural tests or even to run a dynamic version of your application to provide a consistent demo.

### Implementation

[](#implementation)

This library comes with two implementations

- System time, where the time source is the PHP system time.
- Fixed, where the class can be instantiated with a fixed time that will always be returned.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

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

1445d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d7c61125d6a60bc24c5cd19942a135f0b9a7863b038365bcdd58c93cb6b7c9e?d=identicon)[nigelhough](/maintainers/nigelhough)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nigelhough-php-time-source/health.svg)

```
[![Health](https://phpackages.com/badges/nigelhough-php-time-source/health.svg)](https://phpackages.com/packages/nigelhough-php-time-source)
```

###  Alternatives

[ralouphie/mimey

PHP package for converting file extensions to MIME types and vice versa.

3285.9M72](/packages/ralouphie-mimey)[chencha/share

Share links with Laravel

182272.6k](/packages/chencha-share)[bocharsky-bw/arrayzy

A native PHP arrays easy manipulation library in OOP way.

38425.4k](/packages/bocharsky-bw-arrayzy)[mvanduijker/laravel-mercure-broadcaster

Mercure broadcaster

16866.5k](/packages/mvanduijker-laravel-mercure-broadcaster)[matomo/network

21897.4k4](/packages/matomo-network)[marc-mabe/php-enum-phpstan

Enum class reflection extension for PHPStan

13817.7k8](/packages/marc-mabe-php-enum-phpstan)

PHPackages © 2026

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