PHPackages                             rezzza/time-traveler - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. rezzza/time-traveler

AbandonedArchivedStandalone[Testing &amp; Quality](/categories/testing)

rezzza/time-traveler
====================

Travel the time in PHP

v1.0.0(11y ago)1018.4k11[3 issues](https://github.com/rezzza/TimeTraveler/issues)[1 PRs](https://github.com/rezzza/TimeTraveler/pulls)MITPHPPHP &gt;=5.3.2

Since May 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/rezzza/TimeTraveler)[ Packagist](https://packagist.org/packages/rezzza/time-traveler)[ Docs](https://github.com/rezzza/TimeTraveler)[ RSS](/packages/rezzza-time-traveler/feed)WikiDiscussions master Synced yesterday

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

TimeTraveler
============

[](#timetraveler)

[![Latest Stable Version](https://camo.githubusercontent.com/b88bd6781977916de84877f0cd73005ddd6118cf413f7922dec910bc2835d8c2/68747470733a2f2f706f7365722e707567782e6f72672f72657a7a7a612f74696d652d74726176656c65722f762f737461626c652e706e67)](https://packagist.org/packages/rezzza/time-traveler) [![Build Status](https://camo.githubusercontent.com/4d5eb99f9e423c2c30b96e0fec871b441b34e2ff99ae407ae52be99eb875e0d9/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f72657a7a7a612f54696d6554726176656c65722e706e67)](http://travis-ci.org/rezzza/TimeTraveler) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/0f5b27c14ebed706415a8f17bd74fbcf5d4be3b14a3ca36c601ef4fe4762d42b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72657a7a7a612f54696d6554726176656c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/rezzza/TimeTraveler/?branch=master)

```
          _
         /-\
    _____|#|_____
   |_____________|
  |_______________|
|||_Time_Traveler_|||
 | |¯|¯|¯|||¯|¯|¯| |
 | |-|-|-|||-|-|-| |
 | |_|_|_|||_|_|_| |
 | ||~~~| | |¯¯¯|| |
 | ||~~~|!|!| O || |
 | ||~~~| |.|___|| |
 | ||¯¯¯| | |¯¯¯|| |
 | ||   | | |   || |
 | ||___| | |___|| |
 | ||¯¯¯| | |¯¯¯|| |
 | ||   | | |   || |
 | ||___| | |___|| |
|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
 ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

```

Mock the time system in PHP using [AOP-PHP](https://github.com/AOP-PHP/AOP). You can now travel the time on your application easily !

Methods supported
-----------------

[](#methods-supported)

- `DateTime` object.
- `date_create`
- `date`
- `gettimeofday`
- `gmdate`
- `microtime`
- `strtotime`
- `time`

Usage
-----

[](#usage)

```
\Rezzza\TimeTraveler::enable();
\Rezzza\TimeTraveler::moveTo('2011-06-10 11:00:00');

var_dump(new \DateTime());           // 2011-06-10 11:00:00
var_dump(new \DateTime('+2 hours')); // 2011-06-10 13:00:00
var_dump(time());
var_dump(microtime());
var_dump(microtime(true));

\Rezzza\TimeTraveler::comeBack();
```

Launch tests
------------

[](#launch-tests)

```
composer install --dev
bin/atoum

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.7% 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

4377d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c8b9751202ab26ee4447e7ee25333607029e8717579c5dcb17ab0be577fb860c?d=identicon)[spy-seth](/maintainers/spy-seth)

---

Top Contributors

[![stephpy](https://avatars.githubusercontent.com/u/232744?v=4)](https://github.com/stephpy "stephpy (23 commits)")[![armandabric](https://avatars.githubusercontent.com/u/95120?v=4)](https://github.com/armandabric "armandabric (9 commits)")[![shouze](https://avatars.githubusercontent.com/u/54712?v=4)](https://github.com/shouze "shouze (1 commits)")

---

Tags

mocktimestandalone

### Embed Badge

![Health badge](/badges/rezzza-time-traveler/health.svg)

```
[![Health](https://phpackages.com/badges/rezzza-time-traveler/health.svg)](https://phpackages.com/packages/rezzza-time-traveler)
```

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[phake/phake

The Phake mock testing library

4758.0M324](/packages/phake-phake)[kahlan/kahlan

The PHP Test Framework for Freedom, Truth and Justice.

1.2k1.2M247](/packages/kahlan-kahlan)[brain/monkey

Mocking utility for PHP functions and WordPress plugin API

33412.5M350](/packages/brain-monkey)

PHPackages © 2026

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