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

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

ebene7/php-clock
================

E7 PHP clock

v1.0.0(5y ago)1221PHPPHP &gt;=5.4.0

Since Jul 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/ebene7/php-clock)[ Packagist](https://packagist.org/packages/ebene7/php-clock)[ Docs](https://github.com/ebene7/php-clock)[ RSS](/packages/ebene7-php-clock/feed)WikiDiscussions master Synced 5d ago

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

php-clock
=========

[](#php-clock)

Provides a simple abstraction of a clock, following the suggestion by [Martin Fowler](https://martinfowler.com/bliki/ClockWrapper.html).

Installation
------------

[](#installation)

Package is available on [Packagist](http://packagist.org/packages/ebene7/php-clock), you can install it using [Composer](http://getcomposer.org).

```
$ composer require ebene7/php-clock
```

Basic usage
-----------

[](#basic-usage)

### `SystemClock`

[](#systemclock)

Create a SystemClock object and simply use it! Object that will return the current time based on the given timezone

```
