PHPackages                             kumatch/offsettimezone - 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. kumatch/offsettimezone

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

kumatch/offsettimezone
======================

Create a DateTimeZone object by offset

0.1.0(12y ago)0292MITPHPPHP &gt;=5.3.3

Since Sep 24Pushed 12y agoCompare

[ Source](https://github.com/kumatch/php-offsettimezone)[ Packagist](https://packagist.org/packages/kumatch/offsettimezone)[ Docs](https://github.com/kumatch/php-offsettimezone)[ RSS](/packages/kumatch-offsettimezone/feed)WikiDiscussions master Synced 1mo ago

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

OffsetTimezone
==============

[](#offsettimezone)

Create a DateTimeZone object by offset.

Install
-------

[](#install)

Add "kumatch/offsettimezone" as a dependency in your project's composer.json file.

```
{
  "require": {
    "kumatch/offsettimezone": "*"
  }
}

```

And install your dependencies.

```
$ composer install

```

Usage
-----

[](#usage)

```
use Kumatch\OffsetTimeZone\OffsetTimeZone

$offsetTimeZone = new OffsetTimeZone();

$tz0 = $offsetTimeZone->createTimeZone(0);         // UTC timezone
$tz1 = $offsetTimeZone->createTimeZone( 9 * 3600); // UTC +9
$tz2 = $offsetTimeZone->createTimeZone(-7 * 3600); // UTC -7

// print UTC datetime.
$date = new DateTime("now", $tz0);
echo $date->format('Y-m-d H:i:s'), "\n";

// print UTC +9 datetime
$date->setTimetime($tz1);
echo $date->format('Y-m-d H:i:s'), "\n";
```

License
-------

[](#license)

Licensed under the MIT License.

Copyright (c) 2013 Yosuke Kumakura

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

4610d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/47afd1b8d692632cd02d8630a36844daaf9dc77befe5278c7e8452bf52f32921?d=identicon)[kumatch](/maintainers/kumatch)

---

Top Contributors

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

---

Tags

datetimezone

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kumatch-offsettimezone/health.svg)

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

###  Alternatives

[brick/date-time

Date and time library

3623.3M60](/packages/brick-date-time)[dater/dater

Compact PHP library for working with date/time in different formats &amp; timezones.

14282.3k](/packages/dater-dater)[icanboogie/datetime

Extends the features of PHP DateTime and DateTimeZone

51345.7k3](/packages/icanboogie-datetime)[fresh/datetime

PHP library that provides additional functions for processing dates &amp; times.

17513.8k2](/packages/fresh-datetime)

PHPackages © 2026

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